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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-1692

CVE-2025-1692: MongoDB Mongosh RCE Vulnerability

CVE-2025-1692 is a remote code execution vulnerability in MongoDB Mongosh caused by control character injection. Attackers can manipulate clipboard content to execute arbitrary code. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: May 4, 2026

CVE-2025-1692 Overview

CVE-2025-1692 is a control character injection vulnerability [CWE-150] in the MongoDB Shell (mongosh). An attacker who controls the contents of a user's clipboard can craft text containing embedded control characters that, when pasted into mongosh, cause the shell to evaluate hidden malicious code. The control characters obfuscate the payload so the visible text appears benign while additional commands execute. The flaw affects all mongosh versions prior to 2.3.9 and is fixed in that release.

Critical Impact

A successful paste action allows arbitrary code execution within the mongosh session, granting attackers the same database and host privileges as the operator.

Affected Products

  • MongoDB mongosh versions prior to 2.3.9
  • All platforms where mongosh is installed (Windows, macOS, Linux)
  • Workstations of database administrators and developers using interactive shell sessions

Discovery Timeline

  • 2025-02-27 - CVE-2025-1692 published to the National Vulnerability Database (NVD)
  • 2025-09-22 - Last updated in NVD database

Technical Details for CVE-2025-1692

Vulnerability Analysis

The MongoDB Shell is an interactive JavaScript-based command-line interface for MongoDB. Like many terminal applications, it accepts pasted input from the operating system clipboard. CVE-2025-1692 stems from mongosh failing to neutralize control characters embedded in pasted content before evaluation.

Control characters such as carriage return (\r), line feed (\n), and ANSI escape sequences can rewrite the visible portion of a line, hide trailing commands, or force immediate execution. An attacker who stages a malicious clipboard payload through a compromised webpage, a copy button on a documentation site, or clipboard-hijacking malware can trick a user into pasting commands that look harmless but evaluate attacker-controlled JavaScript inside the shell.

Because mongosh evaluates JavaScript with full database privileges and shell capabilities, the injected code can read or modify any collection the user can access, exfiltrate credentials, or invoke operating system commands through shell helpers.

Root Cause

The root cause is improper neutralization of special elements in pasted input [CWE-150]. The shell's input handler renders and evaluates control sequences from the pasted buffer rather than stripping or escaping them prior to display and execution.

Attack Vector

Exploitation requires user interaction. A typical chain involves an attacker hosting attacker-controlled text on a webpage with a misleading "copy" button or hijacking the clipboard via malware. When the victim pastes the buffer into an active mongosh prompt, the obfuscated payload executes. The CVSS vector reflects the network-reachable delivery surface combined with required user interaction.

The vulnerability is described in prose only; no public proof-of-concept code has been published. See the MongoDB Issue Tracker MONGOSH-2025 for vendor details.

Detection Methods for CVE-2025-1692

Indicators of Compromise

  • Unexpected JavaScript evaluation output, errors, or shell helper invocations appearing immediately after a paste action in mongosh
  • mongosh history entries containing embedded control bytes such as \r, \\x1b[, or unusual ANSI escape sequences
  • Anomalous database queries, user creation, or role grants originating from administrator workstations shortly after interactive shell use

Detection Strategies

  • Inventory installed mongosh versions across endpoints and flag any host running a version below 2.3.9
  • Inspect mongosh shell history files for non-printable control characters using tools such as cat -v or hex dumps
  • Correlate MongoDB audit logs with workstation process telemetry to identify queries that do not match documented administrative workflows

Monitoring Recommendations

  • Enable MongoDB server-side audit logging for authentication, role changes, and eval-style operations executed from administrative accounts
  • Monitor endpoints for clipboard-hijacking malware families and browser extensions that overwrite clipboard contents
  • Alert on mongosh child processes spawning shells, network utilities, or credential access tools

How to Mitigate CVE-2025-1692

Immediate Actions Required

  • Upgrade mongosh to version 2.3.9 or later on every workstation, jump host, and CI runner where the shell is installed
  • Instruct database operators to avoid pasting clipboard content directly into mongosh from untrusted web pages or documents
  • Review recent administrative activity on MongoDB clusters for unauthorized changes that may have originated from a compromised paste session

Patch Information

MongoDB resolved CVE-2025-1692 in mongosh2.3.9. Refer to the vendor advisory at MongoDB Issue Tracker MONGOSH-2025 for the full fix description and download links.

Workarounds

  • Paste clipboard content into a plain-text editor first to inspect for hidden control characters before transferring it to mongosh
  • Use bracketed paste–aware terminals and review multi-line input prompts before pressing Enter
  • Restrict administrative mongosh use to hardened jump hosts where browser-based clipboard exposure is minimized
bash
# Verify the installed mongosh version and upgrade if below 2.3.9
mongosh --version

# Example upgrade via npm
npm install -g mongosh@latest

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechMongodb Mongosh

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.14%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-150
  • Vendor Resources
  • MongoDB Issue Tracker MONGOSH-2025
  • Latest CVEs
  • CVE-2026-46333: Linux Kernel Privilege Escalation Flaw

  • CVE-2026-2586: Eclipse Glassfish RCE Vulnerability

  • CVE-2026-2587: Eclipse Glassfish RCE Vulnerability

  • CVE-2026-45255: FreeBSD bsdinstall/bsdconfig RCE Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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