CVE-2025-1691: MongoDB Shell may be susceptible to Control Character Injection via autocomplete
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.
Published Feb 27, 2025
Affected packages
mongosh
- Ecosystem
- npm
- Affected
- < 2.3.9
- Fixed in
- 2.3.9
- Check
npm ls mongosh
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2025-1692
MongoDB Shell may be susceptible to control character injection via pasting
medium6.3Feb 27, 2025CVE-2025-1693
MongoDB Shell may be susceptible to control character Injection via shell output
low3.9Feb 27, 2025CVE-2025-1756
mongosh vulnerable to local privilege escalation
high7.5Feb 27, 2025
