# CVE-2026-35385: OpenSSH scp improper permission preservation in legacy mode

Source: https://junglewise.ai/threats/cve-2026-35385-openssh-scp-improper-permission-preservation-in-legacy-mode  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-02. Updated: 2026-06-30  
License: CC BY 4.0 with a link back

CVE-2026-35385 · Severity: high · CVSS 7.5 · Published 2026-04-02

OpenSSH is a widely used tool for secure remote access and file transfers. A security issue was identified in the 'scp' file transfer utility where, under specific conditions, downloaded files could retain dangerous 'setuid' or 'setgid' permissions. If an administrator uses the legacy protocol to download a malicious file, that file could be granted elevated system privileges, potentially allowing an attacker to gain unauthorized control over the local system.

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

## Quick answers

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

**How severe is CVE-2026-35385?** High severity, with a CVSS score of 7.5, published 2 April 2026.

**Which products and versions are affected?** OpenSSH OpenSSH before 10.3; Red Hat Enterprise Linux Server 6, 7, 8, 9.

**Is there a fix for CVE-2026-35385?** 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-2026-35385 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-35385?** Check whether you run OpenBSD Openssh. 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 the OpenSSH scp(1) client due to improper preservation of file permissions (CWE-281). When a user performs a download as root using the legacy SCP protocol (via the -O flag) and does not explicitly request to preserve modes (without the -p flag), the client fails to clear the setuid and setgid bits from the received file. An attacker who controls a remote server or can intercept the connection could provide a malicious file with these bits set. If the local root user downloads such a file, it will be installed with elevated privileges, potentially leading to local privilege escalation. This issue was addressed in OpenSSH version 10.3.

## Affected products

- OpenSSH OpenSSH before 10.3
- Red Hat Enterprise Linux Server 6, 7, 8, 9

## Timeline

- 2026-04-02: advisory: OpenSSH 10.3 released with security fixes
- 2026-04-02: disclosed

## References

- [https://marc.info/?l=openssh-unix-dev&m=177513443901484&w=2](https://marc.info/?l=openssh-unix-dev&m=177513443901484&w=2)
- [https://www.openssh.org/releasenotes.html](https://www.openssh.org/releasenotes.html)
- [https://www.openwall.com/lists/oss-security/2026/04/02/3](https://www.openwall.com/lists/oss-security/2026/04/02/3)
- [https://access.redhat.com/errata/RHSA-2026:12389](https://access.redhat.com/errata/RHSA-2026:12389)
- [https://access.redhat.com/errata/RHSA-2026:13380](https://access.redhat.com/errata/RHSA-2026:13380)
- [https://access.redhat.com/errata/RHSA-2026:13381](https://access.redhat.com/errata/RHSA-2026:13381)
- [https://access.redhat.com/errata/RHSA-2026:13383](https://access.redhat.com/errata/RHSA-2026:13383)

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