All reports
High

OpenSSH: OpenSSH: Privilege escalation via scp legacy protocol when not preserving file mode

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2026-35385

Probability of exploitation in the next 30 days: 0.59%

FIRST EPSS · 2026-11-20

Description

In OpenSSH before 10.3, a file downloaded by scp may be installed setuid or setgid, an outcome contrary to some users' expectations, if the download is performed as root with -O (legacy scp protocol) and without -p (preserve mode).

A flaw was found in OpenSSH. When the scp command is used by a root user to download a file with the legacy protocol option (-O) and without preserving original file permissions (-p), the downloaded file can be installed with elevated privileges (setuid or setgid). This unexpected behavior could allow a malicious file to execute with higher permissions than intended, posing a security risk through potential privilege escalation.