Repository navigation
Security
Versions 7.0.1 to 9.1.5 documented a "read-only" disabled.tools list that left aggregate-data enabled. An aggregation pipeline with a $out or $merge stage could still create or replace collections when the MongoDB user had write access. Advisory: GHSA-5v9w-pf6p-4j65. Thanks to @chrispham-cyber for the report.
Upgrade to 9.2.0. If you use the old README list, you need no config change: MongoDB Lens now rejects $out and $merge when insert-document, update-document, or delete-document is disabled.
For a guarantee that MongoDB Lens cannot change your data, connect as a MongoDB user with the read role.
New
readOnlysetting (CONFIG_READ_ONLY=true). MongoDB Lens registers only read tools, rejects$outand$mergestages, and does not change database profiler settings.- Startup prints
Read-only mode: onwhen the setting is active. - The server instructions and the
aggregate-datadescription tell the AI client which tools are available and that$outand$mergewrite data.
Changed startup behaviour
MongoDB Lens now exits with an error, instead of starting with default settings, when:
CONFIG_READ_ONLYis nottrueorfalse- the configuration file is not valid JSON
- the configuration file has a misspelled
readOnlykey, such asreadonly
$out and $merge stages are rejected when any of insert-document, update-document, or delete-document is disabled. To use these stages, keep those tools enabled and leave readOnly off.
Fixed
analyze-query-patternsnow restores the previous profiler settings after an error.