# CVE-2026-59996: OpenBSD OpenSSH path traversal in scp remote-to-remote copy

Source: https://junglewise.ai/threats/cve-2026-59996-openbsd-openssh-path-traversal-in-scp-remote-to-remote-copy  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-08. Updated: 2026-07-08  
License: CC BY 4.0 with a link back

CVE-2026-59996 · Severity: medium · CVSS 4.2 · Published 2026-07-08

A vulnerability in the OpenSSH scp utility could allow a malicious server to write files to unintended locations on a user's system. When a user performs a remote-to-remote file copy, a compromised server could redirect the file to a parent directory instead of the specified target. This could lead to unauthorized file placement or the overwriting of important data if a user is tricked into connecting to a malicious host.

Technologies: [OpenBSD Openssh](https://junglewise.ai/threats/technologies/openssh). Vendors: [OpenBSD](https://junglewise.ai/threats/vendors/openbsd).

## Quick answers

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

**How severe is CVE-2026-59996?** Medium severity, with a CVSS score of 4.2, published 8 July 2026.

**Which products and versions are affected?** OpenBSD Openssh before 10.4.

**Is there a fix for CVE-2026-59996?** A patch was published on 2026-07-06: OpenSSH 10.4 released with a fix. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-59996 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-59996?** Check whether you run OpenBSD Openssh 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 relative path traversal vulnerability (CWE-23) exists in the scp client of OpenSSH versions prior to 10.4. The flaw occurs during remote-to-remote file transfers where the client fails to sufficiently validate the destination path provided by the server. A malicious or compromised remote server can exploit this by sending a file that is placed in the parent directory of the intended target. Exploitation requires a user to initiate a copy between two remote destinations, one of which is controlled by the attacker. The issue is addressed in OpenSSH 10.4.

## Affected products

- OpenBSD OpenSSH before 10.4

## Timeline

- 2026-07-06: patched: OpenSSH 10.4 released with a fix.
- 2026-07-08: advisory: CVE-2026-59996 published.

## References

- [https://marc.info/?l=openssh-unix-dev&m=178333966933090&w=2](https://marc.info/?l=openssh-unix-dev&m=178333966933090&w=2)
- [https://www.openssh.org/releasenotes.html](https://www.openssh.org/releasenotes.html)
- [https://www.openwall.com/lists/oss-security/2026/07/06/5](https://www.openwall.com/lists/oss-security/2026/07/06/5)

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