Junglewise Threat Intelligence

CVE-2025-61984: OpenSSH code execution via control characters in ProxyCommand usernames

CVE-2025-61984 · Severity: low · CVSS 3.6 · Published 2025-10-06

Technologies: Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP, Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP, Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP, OpenBSD Openssh. Vendors: Siemens, OpenBSD.

Executive brief

OpenSSH, a widely used tool for secure remote access, contains a vulnerability that could allow an attacker to execute unauthorized commands. This occurs when a user connects to a server using a specially crafted username containing hidden control characters, provided the system is configured to use a specific 'ProxyCommand' setting. While the risk is relatively low and requires specific configurations, successful exploitation could allow an attacker to gain deeper access to the system or disrupt operations.

Technical details

A vulnerability exists in OpenSSH's handling of usernames originating from the command line or configuration file %-sequence expansions. The software fails to properly sanitize control characters in these usernames. If a user's configuration utilizes the 'ProxyCommand' directive with the %u (username) expansion, an attacker can inject shell expressions via these control characters. This results in arbitrary code execution in the context of the user starting the ssh session. The vulnerability is mitigated by the fact that literal usernames in configuration files are considered trusted and not subject to these checks. The issue is addressed in OpenSSH version 10.1.

Affected products

  • OpenBSD OpenSSH before 10.1
  • Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP V3.1.6 and later
  • Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP V3.1.6 and later
  • Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP V3.1.6 and later

Timeline

  • 2025-10-06: advisory: OpenSSH 10.1 released with security fix
  • 2025-10-06: disclosed: CVE-2025-61984 published

References

Related threats