CVE-2025-1692 MongoDB Shell may be susceptible to control character injection via pasting
An attacker with clipboard access can inject control characters into the MongoDB Shell to execute arbitrary code via pasted text.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-1692?
CVE-2025-1692 is a medium-severity code injection vulnerability in MongoDB Inc mongosh, published on 27 Feb 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
The MongoDB Shell may be susceptible to control character injection where an attacker with control of the user’s clipboard could manipulate them to paste text into mongosh that evaluates arbitrary code. Control characters in the pasted text can be used to obfuscate malicious code. This issue affects mongosh versions prior to 2.3.9
Weakness: CWE-150
Which versions are affected by CVE-2025-1692?
2 open source packages ship an affected version, including mongosh. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
mongosh npm | All versions | 2.3.9 |
mongosh npm | All versions | 2.3.9 |
Products include Mongodb Mongosh.
How do I fix CVE-2025-1692?
Upgrade mongosh to 2.3.9 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2025-1692 being exploited?
There is no known exploitation of CVE-2025-1692 in the wild and no public exploit code.
Other vulnerabilities in MongoDB Inc mongosh
Sources
Also known as GHSA-973h-3x6p-qg37.