Skip to content

← Public intelligence

npm package

mongosh

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

4 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 7.5npmAmendedPublished

    mongosh vulnerable to local privilege escalation

    CVE-2025-1756 · GHSA-f5w3-73h4-jpcm

    Affected
    • npm mongosh < 2.3.0
    Fixed in
    2.3.0· Vendor fix available
    Issue
    mongosh may be susceptible to local privilege escalation under certain conditions potentially enabling unauthorized actions on a user's system with elevated privilege, when a crafted file is stored in C:\nodemodules\. This issue affects mongosh prior to 2.3.0.

    Recommended action: Upgrade to 2.3.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. High, CVSS 7.6npmAmendedPublished

    MongoDB Shell may be susceptible to Control Character Injection via autocomplete

    CVE-2025-1691 · GHSA-43g5-2wr2-q7vj

    Affected
    • npm mongosh < 2.3.9
    Fixed in
    2.3.9· Vendor fix available
    Issue
    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.

    Recommended action: Upgrade to 2.3.9 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. Low, CVSS 3.9npmAmendedPublished

    MongoDB Shell may be susceptible to control character Injection via shell output

    CVE-2025-1693 · GHSA-r95j-4jvf-mrrw

    Affected
    • npm mongosh < 2.3.9
    Fixed in
    2.3.9· Vendor fix available
    Issue
    The MongoDB Shell may be susceptible to control character injection where an attacker with control over the database cluster contents can inject control characters into the shell output. This may result in the display of falsified messages that appear to originate from mongosh or the underlying operating system, potentially misleading users into executing unsafe actions. The vulnerability is exploitable only when mongosh is connected to a cluster that is partially or fully controlled by an attacker. This issue affects mongosh versions prior to 2.3.9.

    Recommended action: Upgrade to 2.3.9 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  4. Medium, CVSS 6.3npmAmendedPublished

    MongoDB Shell may be susceptible to control character injection via pasting

    CVE-2025-1692 · GHSA-973h-3x6p-qg37

    Affected
    • npm mongosh < 2.3.9
    Fixed in
    2.3.9· Vendor fix available
    Issue
    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.

    Recommended action: Upgrade to 2.3.9 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →