The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-1756

CVE-2025-1756: MongoDB Mongosh Privilege Escalation Flaw

CVE-2025-1756 is a local privilege escalation vulnerability in MongoDB Mongosh that allows attackers to execute unauthorized actions with elevated privileges. This article covers the technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-1756 Overview

CVE-2025-1756 is a local privilege escalation vulnerability affecting MongoDB Shell (mongosh) prior to version 2.3.0. The vulnerability exists due to an untrusted search path condition (CWE-426) that allows a local attacker with low privileges to execute unauthorized actions on a user's system with elevated privileges. Exploitation requires placing a specially crafted file in the C:\node_modules\ directory on Windows systems.

This vulnerability represents a significant risk in multi-user environments where attackers with limited access can escalate their privileges by exploiting mongosh's module loading behavior.

Critical Impact

Local attackers can achieve privilege escalation through crafted files in C:\node_modules\, potentially gaining full control of the affected system with elevated privileges.

Affected Products

  • MongoDB mongosh versions prior to 2.3.0
  • Red Hat CodeReady Linux Builder EUS 9.4 (multiple architectures)
  • Red Hat Enterprise Linux EUS 9.4 (multiple platforms including ARM64, IBM Z Systems, Power LE)
  • Red Hat Enterprise Linux Server AUS 9.4
  • Red Hat Enterprise Linux Update Services for SAP Solutions 9.4

Discovery Timeline

  • February 27, 2025 - CVE-2025-1756 published to NVD
  • April 9, 2025 - Last updated in NVD database

Technical Details for CVE-2025-1756

Vulnerability Analysis

This vulnerability stems from an untrusted search path weakness (CWE-426) in mongosh's module resolution mechanism on Windows systems. When mongosh executes, it searches for Node.js modules in predictable locations, including the root-level C:\node_modules\ directory. This directory is typically writable by users with limited privileges, creating an opportunity for attackers to inject malicious code that will be executed with the privileges of the mongosh process.

The vulnerability requires local access to the system and the ability to write files to the C:\node_modules\ directory. Once a malicious module is placed in this location, it will be loaded when mongosh is executed by a higher-privileged user or service, resulting in privilege escalation.

Root Cause

The root cause of CVE-2025-1756 is mongosh's reliance on Node.js module resolution behavior, which searches parent directories up to the root of the filesystem for node_modules folders. On Windows systems, this includes C:\node_modules\, which may have permissive access controls allowing low-privileged users to create or modify files. When mongosh resolves required modules, it may inadvertently load attacker-controlled code from this untrusted location rather than legitimate bundled modules.

Attack Vector

The attack requires local access and follows these steps:

  1. An attacker with low-privilege local access identifies that mongosh is installed on the system
  2. The attacker creates a malicious Node.js module in C:\node_modules\ with a name matching a module that mongosh attempts to load
  3. When a higher-privileged user or automated service executes mongosh, the malicious module is loaded due to the Node.js module resolution order
  4. The attacker's code executes with the privileges of the user running mongosh, achieving privilege escalation

The attack does not require user interaction beyond the victim running mongosh, and exploitation complexity is low given that the attacker only needs write access to a predictable filesystem location.

Detection Methods for CVE-2025-1756

Indicators of Compromise

  • Presence of unexpected files or directories in C:\node_modules\ on Windows systems
  • Creation of Node.js module files (.js, .json, package.json) in C:\node_modules\ by non-administrative users
  • Suspicious mongosh process behavior or unexpected child processes spawned during mongosh execution
  • File system audit logs showing write operations to C:\node_modules\ by low-privileged accounts

Detection Strategies

  • Monitor file system activity in C:\node_modules\ using endpoint detection tools or Windows file auditing
  • Implement application allowlisting to detect unauthorized code execution from untrusted locations
  • Deploy behavioral analysis to identify mongosh processes loading modules from unexpected paths
  • Review Windows Security Event logs for file creation events (Event ID 4663) targeting C:\node_modules\

Monitoring Recommendations

  • Configure SentinelOne to alert on file creation or modification events in C:\node_modules\
  • Enable process ancestry monitoring to detect mongosh loading modules from non-standard locations
  • Implement baseline monitoring of mongosh module dependencies to identify anomalous module loading
  • Set up alerts for privilege escalation patterns following mongosh execution

How to Mitigate CVE-2025-1756

Immediate Actions Required

  • Upgrade mongosh to version 2.3.0 or later immediately
  • Audit and remove any unexpected files from C:\node_modules\ on affected systems
  • Restrict write permissions on C:\node_modules\ to administrative users only
  • Review systems for signs of compromise if mongosh was running in privileged contexts
  • Apply Red Hat security updates for affected Enterprise Linux distributions

Patch Information

MongoDB has addressed this vulnerability in mongosh version 2.3.0. Organizations should upgrade to this version or later to remediate the vulnerability. Red Hat has also released security updates for affected Enterprise Linux products through Red Hat Security Errata RHSA-2025:1756.

For detailed information about the fix, refer to the MongoDB Jira Issue MONGOSH-2028.

Workarounds

  • Remove or rename the C:\node_modules\ directory if it is not required by other applications
  • Restrict ACLs on C:\node_modules\ to prevent write access by non-administrative users
  • Avoid running mongosh with elevated privileges until the patch is applied
  • Consider using containerized or isolated environments for database administration tasks
bash
# Windows: Restrict permissions on C:\node_modules (run as Administrator)
# Remove existing directory if not needed
rmdir /s /q C:\node_modules

# Or restrict write access using icacls
icacls "C:\node_modules" /inheritance:r /grant:r "Administrators:(OI)(CI)F" /grant:r "SYSTEM:(OI)(CI)F"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechMongodb

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-426
  • Technical References
  • Red Hat Security Errata RHSA-2025:1756
  • Vendor Resources
  • MongoDB Jira Issue MONGOSH-2028
  • Related CVEs
  • CVE-2024-7553: MongoDB Privilege Escalation Vulnerability

  • CVE-2026-4148: MongoDB Use-After-Free Vulnerability

  • CVE-2026-4359: MongoDB C Driver DoS Vulnerability

  • CVE-2026-3431: SimStudio Auth Bypass Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English