Cyber Resilience

CVE-2025-1691

Mongodb Mongosh ≤ 2.3.9

Published
27 February 2025
Modified
22 September 2025
Patch / advisory
CVSS Score v3.1 7.6
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H
EPSS Score 0.0030 22th percentile
Risk Priority 52 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2025-1691 is a high-severity Injection (CWE-74) vulnerability in Mongodb Mongosh. Its CVSS base score is 7.6 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 22th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2025-1691 is a control character injection vulnerability in the MongoDB Shell, known as mongosh. It allows an attacker with control over the mongosh autocomplete feature to inject and execute obfuscated malicious text through the autocompletion mechanism. The issue requires user interaction, specifically pressing the 'tab' key to autocomplete text that matches a prefix prepared by the attacker. This vulnerability affects mongosh versions prior to 2.3.9.

Exploitation is possible only when mongosh is connected to a MongoDB cluster that is partially or fully controlled by the attacker. The attacker needs high privileges (PR:H) on the cluster, network access (AV:N), and must overcome high attack complexity (AC:H), along with tricking the user into required interaction (UI:R). Successful exploitation can result in high impacts to confidentiality, integrity, and availability (C:H/I:H/A:H) with a changed scope (S:C), earning a CVSS v3.1 base score of 7.6. The associated CWE is CWE-74.

Mitigation requires upgrading to mongosh version 2.3.9 or later. Additional details are available in the MongoDB advisory at https://jira.mongodb.org/browse/MONGOSH-2024.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1221 Template Injection Stealth
Adversaries may create or modify references in user document templates to conceal malicious code or force authentication attempts.
T1659 Content Injection Initial Access
Adversaries may gain access and continuously communicate with victims by injecting malicious content into systems through online network traffic.
T1674 Input Injection Execution
Adversaries may simulate keystrokes on a victim’s computer by various means to perform any type of action on behalf of the user, such as launching the command interpreter using keyboard shortcuts, typing an inline script to be executed,…
T1059 Command and Scripting Interpreter Execution
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries.
T1059.001 PowerShell Execution
Adversaries may abuse PowerShell commands and scripts for execution.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2023-27040Shared CWE-74
CVE-2023-49964Shared CWE-74
CVE-2026-6279Shared CWE-74
CVE-2025-27794Shared CWE-74
CVE-2023-48205Shared CWE-74
CVE-2025-40710Shared CWE-74
CVE-2023-43655Shared CWE-74
CVE-2023-29827Shared CWE-74
CVE-2023-29526Shared CWE-74
CVE-2023-7039Shared CWE-74

Affected Assets

mongodb
mongosh
≤ 2.3.9

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)

—

Validate
Prove the fix (OWASP ASVS)
  • V1.2.1
  • V1.2.3
  • V1.2.5
  • V1.2.8

Mitigating Controls (NIST 800-53 r5) AI

SI-10 directly requires validation of information inputs to reject malformed or special-element content before it reaches downstream parsers.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require input validation and output encoding that prevent injection flaws.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing in development catches injection vulnerabilities before release.

A.8.15 Logging partial match
finds

Logging supports detection of injection attempts but does not prevent the weakness.

finds

Monitoring activities can identify active injection attacks after they occur.

prevents

Secure development life cycle mandates input validation and output encoding that directly prevent injection flaws.

prevents

Application security requirements explicitly call for controls against injection attacks in software design.

prevents

Secure architecture principles reduce injection surfaces but do not prescribe specific neutralization techniques.

References