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-61984

CVE-2025-61984: OpenSSH RCE Vulnerability

CVE-2025-61984 is a remote code execution vulnerability in OpenSSH before version 10.1 that allows control characters in usernames, potentially enabling attackers to execute code. This article covers technical details, impact, and mitigations.

Published: April 1, 2026

CVE-2025-61984 Overview

CVE-2025-61984 is a command injection vulnerability in OpenSSH versions prior to 10.1 that allows control characters in usernames originating from untrusted sources. When a ProxyCommand is configured, these malicious control characters can potentially lead to code execution. The untrusted sources include command-line input and %-sequence expansion of configuration files. Notably, configuration files that provide complete literal usernames are not categorized as untrusted sources.

Critical Impact

Attackers with local access can inject control characters into SSH usernames, potentially achieving arbitrary code execution when ProxyCommand is enabled in the SSH configuration.

Affected Products

  • OpenSSH versions before 10.1
  • Systems using ProxyCommand configurations with user-controlled input
  • SSH clients processing usernames from command-line or %-sequence expansion

Discovery Timeline

  • 2025-10-06 - CVE-2025-61984 published to NVD
  • 2025-11-11 - Last updated in NVD database

Technical Details for CVE-2025-61984

Vulnerability Analysis

This vulnerability exploits insufficient input validation in OpenSSH's handling of usernames when they are passed to ProxyCommand configurations. The core issue lies in how OpenSSH processes usernames that may contain control characters, particularly newlines and other special characters that can alter command execution flow.

When a user specifies a username via the command line or through %-sequence expansion in a configuration file, OpenSSH fails to properly sanitize these inputs before passing them to the shell for ProxyCommand execution. This allows an attacker to inject arbitrary shell commands by embedding control characters within the username field.

The vulnerability is classified under CWE-159 (Improper Handling of Invalid Use of Special Elements), highlighting the failure to properly handle special characters that have meaning in the execution context.

Root Cause

The root cause stems from OpenSSH's insufficient sanitization of username input before it is interpolated into ProxyCommand shell execution. When usernames are sourced from the command line or configuration file %-sequences, control characters such as newlines (\n) are not stripped or escaped. This allows attackers to break out of the intended command context and inject additional shell commands.

The vulnerability specifically affects the interaction between bash's handling of newlines and SSH's ProxyCommand feature, where a carefully crafted username containing a newline can result in command injection.

Attack Vector

The attack requires local access to the system and leverages the ProxyCommand feature commonly used for SSH proxying and tunneling. An attacker can craft a malicious username containing control characters (particularly newlines) that, when expanded in the ProxyCommand context, results in arbitrary command execution.

The exploitation scenario typically involves:

  1. An attacker with local access to a system running a vulnerable OpenSSH version
  2. An SSH configuration that utilizes ProxyCommand with username expansion
  3. A crafted username containing control characters injected via command-line or %-sequence expansion

The attack exploits how bash interprets newline characters within command substitution, allowing an attacker to inject additional commands that execute in the context of the SSH client process.

Detection Methods for CVE-2025-61984

Indicators of Compromise

  • Unusual SSH connection attempts with usernames containing non-printable or control characters
  • Unexpected command execution patterns originating from SSH client processes
  • SSH client logs showing malformed or unusually long usernames
  • Shell history entries containing suspicious ssh commands with encoded characters

Detection Strategies

  • Monitor SSH client command-line arguments for control characters or encoded newlines in username fields
  • Implement logging of ProxyCommand execution to detect anomalous command patterns
  • Review SSH configuration files for %-sequence expansions that may be vulnerable to injection
  • Deploy endpoint detection rules to identify SSH processes spawning unexpected child processes

Monitoring Recommendations

  • Enable verbose logging on SSH clients to capture connection parameters
  • Configure system auditing to monitor SSH binary execution and associated arguments
  • Implement file integrity monitoring on SSH configuration files
  • Review authentication logs for usernames with non-ASCII characters or unusual patterns

How to Mitigate CVE-2025-61984

Immediate Actions Required

  • Upgrade OpenSSH to version 10.1 or later immediately
  • Audit SSH configurations for ProxyCommand usage with user-controlled input
  • Review and restrict access to systems running vulnerable OpenSSH versions
  • Temporarily disable ProxyCommand configurations that accept untrusted username input

Patch Information

The vulnerability is addressed in OpenSSH version 10.1p1. The fix implements proper sanitization of control characters in usernames before they are passed to ProxyCommand execution. Administrators should upgrade to this version or later to remediate the vulnerability.

For detailed release information, see the OpenSSH Release Notes 10.1p1. Additional technical discussion is available on the OpenSSH Developer Mailing List.

Community-provided detection and mitigation scripts are available from Vicarius Detection Script and Vicarius Mitigation Script.

Workarounds

  • Avoid using ProxyCommand configurations that accept usernames from untrusted sources
  • Use complete literal usernames in SSH configuration files rather than relying on %-sequence expansion
  • Implement input validation at the application layer before passing usernames to SSH
  • Restrict SSH client execution to trusted users and processes until patching is complete
bash
# Verify OpenSSH version
ssh -V

# Check for ProxyCommand usage in SSH configs
grep -r "ProxyCommand" ~/.ssh/config /etc/ssh/ssh_config 2>/dev/null

# Update OpenSSH on Debian/Ubuntu
sudo apt update && sudo apt install openssh-client

# Update OpenSSH on RHEL/CentOS
sudo dnf update openssh-clients

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechOpenssh

  • SeverityLOW

  • CVSS Score3.6

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-159
  • Technical References
  • OpenSSH Developer Mailing List Post

  • OpenSSH Release Notes 10.1p1

  • Openwall OSS Security Mailing List Post

  • Openwall OSS Security Mailing List Post

  • Openwall OSS Security Mailing List Post

  • Vicarius CVE-2025-61984 Detection Script

  • Vicarius CVE-2025-61984 Mitigation Script

  • DGL Blog CVE-2025-61984 Analysis
  • Related CVEs
  • CVE-2023-51385: OpenBSD OpenSSH RCE Vulnerability

  • CVE-2020-15778: OpenSSH SCP Command Injection Vulnerability

  • CVE-2024-6409: OpenSSH sshd Race Condition RCE Vulnerability

  • CVE-2023-38408: OpenBSD OpenSSH ssh-agent RCE 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