Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. mongosh
  4. ›
  5. CVE-2025-1691

CVE-2025-1691: MongoDB Shell may be susceptible to Control Character Injection via autocomplete

February 27, 2025

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

  • github.com/advisories/GHSA-43g5-2wr2-q7vj
  • github.com/mongodb-js/mongosh
  • jira.mongodb.org/browse/MONGOSH-2024
  • nvd.nist.gov/vuln/detail/CVE-2025-1691

Code Behaviors & Features

Detect and mitigate CVE-2025-1691 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.3.9

Fixed versions

  • 2.3.9

Solution

Upgrade to version 2.3.9 or above.

Impact 7.6 HIGH

CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Source file

npm/mongosh/CVE-2025-1691.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:50 +0000.