Improper Neutralization of Null Byte or NUL Character in OpenSSH - CVE-2025-61985

 

Improper Neutralization of Null Byte or NUL Character in OpenSSH - CVE-2025-61985

Published: October 10, 2025


Vulnerability identifier: #VU116883
CSH Severity: Low
CVSS v4.0: CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:U/U:Clear
CVE-ID: CVE-2025-61985
CWE-ID: CWE-158
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: OpenSSH
Affected software:
OpenSSH

Detailed vulnerability description

The vulnerability allows a remote attacker to execute arbitrary OS commands on the system.

The vulnerability exists due to incorrect handling of the nullbyte character in an ssh:// URI if a ProxyCommand that uses the %r expansion was configured. A remote attacker can trick the victim into using a specially crafted ssh command to connect to a remote server and execute arbitrary OS commands on the system.

This vulnerability affects ssh client command and does not affect the sshd daemon. 


How to mitigate CVE-2025-61985

Install updates from vendor's website.

Sources