GPU VulnDB

Database/Kernel, userspace & hypervisor

OpenSSH scp: file fetched as root with -O and without -p can land setuid or setgid

CVE-2026-35385Kernel, userspace & hypervisorcurated

Impact

When root downloads a file with scp using the legacy protocol (-O) and does not pass -p, the remote side can cause the resulting local file to be created setuid or setgid. A hostile or compromised server on the other end therefore gets a setuid-root binary written onto the client machine, which any local user can then execute - a straightforward local privilege escalation on the box that ran the copy. The narrow condition is what limits this: it needs root, -O, and no -p. Provisioning and image-build scripts that still pin -O for compatibility are the realistic place this fires on a fleet, and they typically run as root against the same source across many nodes.

Who can reach it

Requires the operator to run scp as root with -O and without -p against a server the attacker controls or has compromised. No credentials on the client are needed; the attacker's position is on the remote end of the transfer.

What to do

Upgrade to OpenSSH 10.3 / 10.3p1 or a distribution backport - Red Hat has shipped RHSA-2026:12389 and RHSA-2026:13380. This is a client-side binary, so updating the openssh package is sufficient; no sshd restart or node reboot is required for the fix itself. As an immediate mitigation, drop -O from root-run scp invocations or move them to sftp.

References

Related entries

All Kernel, userspace & hypervisor entries

This entry is curated: imported from vendor advisories with machine assistance, not yet individually verified. Confirm against your vendor's advisory before acting, and report anything wrong.