Vulnerability · Published Feb 27, 2025 · Assigned by mongodb
CVE-2025-1691MongoDB Shell may be susceptible to Control Character Injection via autocomplete
High 7.6
In plain English
A high-severity injection in mongosh from MongoDB Inc. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 29% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
The MongoDB Shell may be susceptible to control character injection where an attacker with control of the mongosh autocomplete feature, can use the autocompletion feature to input and run obfuscated malicious text. This requires user interaction in the form of the user using ‘tab’ to autocomplete text that is a prefix of the attacker’s prepared autocompletion. This issue affects mongosh versions prior to 2.3.9. The vulnerability is exploitable only when mongosh is connected to a cluster that is partially or fully controlled by an attacker.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | mongosh | 2.3.9 | GHSA-43g5-2wr2-q7vj |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| MongoDB Inc | mongosh | 0 – before 2.3.9 |
Weakness: CWE-74 · Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H