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

Source: https://junglewise.ai/threats/cve-2025-61984-openssh-code-execution-via-control-characters-in-proxycommand  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-10-06. Updated: 2026-07-14  
License: CC BY 4.0 with a link back

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

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.

Technologies: [OpenBSD Openssh](https://junglewise.ai/threats/technologies/openssh), [Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP](https://junglewise.ai/threats/technologies/simatic-s7-1500-cpu-1518-4-pn-dp-mfp), [Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP](https://junglewise.ai/threats/technologies/simatic-s7-1500-cpu-1518f-4-pn-dp-mfp), [Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP](https://junglewise.ai/threats/technologies/siplus-s7-1500-cpu-1518-4-pn-dp-mfp). Vendors: [OpenBSD](https://junglewise.ai/threats/vendors/openbsd), [Siemens](https://junglewise.ai/threats/vendors/siemens).

## Quick answers

**Is CVE-2025-61984 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-61984 being exploited in the wild.

**How severe is CVE-2025-61984?** Low severity, with a CVSS score of 3.6, published 6 October 2025.

**Which products and versions are affected?** 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.

**Is there a fix for CVE-2025-61984?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2025-61984 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2025-61984?** Check whether you run OpenBSD Openssh, Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP, Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

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

- [https://marc.info/?l=openssh-unix-dev&m=175974522032149&w=2](https://marc.info/?l=openssh-unix-dev&m=175974522032149&w=2)
- [https://www.openssh.com/releasenotes.html](https://www.openssh.com/releasenotes.html)
- [https://www.openwall.com/lists/oss-security/2025/10/06/1](https://www.openwall.com/lists/oss-security/2025/10/06/1)
- [http://www.openwall.com/lists/oss-security/2025/10/07/1](http://www.openwall.com/lists/oss-security/2025/10/07/1)
- [http://www.openwall.com/lists/oss-security/2025/10/12/1](http://www.openwall.com/lists/oss-security/2025/10/12/1)
- [https://www.vicarius.io/vsociety/posts/cve-2025-61984-detection-script-remote-code-execution-vulnerability-affecting-openssh](https://www.vicarius.io/vsociety/posts/cve-2025-61984-detection-script-remote-code-execution-vulnerability-affecting-openssh)
- [https://www.vicarius.io/vsociety/posts/cve-2025-61984-mitigation-script-remote-code-execution-vulnerability-affecting-openssh](https://www.vicarius.io/vsociety/posts/cve-2025-61984-mitigation-script-remote-code-execution-vulnerability-affecting-openssh)

## Related threats

- [OpenSSH password authentication bypass on musl libc without PAM](https://junglewise.ai/threats/cve-2026-123158-sshd-in-openssh-before-10-6p2-on-linux-when-musl-libc-is-used)
- [In sshd in OpenSSH before 10.5, the restrict keyword (in authorized_keys) was supposed to be applicable to tunnel forwarding but was not.](https://junglewise.ai/threats/cve-2026-73283-in-sshd-in-openssh-before-10-5-the-restrict-keyword-in-authorized)
- [In ssh in OpenSSH before 10.5, a use-after-free for realloc data can occur if a certain pair of remote-forwarding operations are concurrent.](https://junglewise.ai/threats/cve-2026-73282-in-ssh-in-openssh-before-10-5-a-use-after-free-for-realloc-data)
- [In ssh-agent in OpenSSH before 10.5, some operations can occur remotely but were intended to occur only locally…](https://junglewise.ai/threats/cve-2026-73281-in-ssh-agent-in-openssh-before-10-5-some-operations-can-occur)
- [OpenSSH use-after-free in ssh client during key re-exchange](https://junglewise.ai/threats/cve-2026-60002-openssh-use-after-free-in-ssh-client-during-key-re-exchange)
