CVE-2019-6111: Path Traversal
An issue was discovered in OpenSSH 7.9. Due to the scp implementation being derived from 1983 rcp, the server chooses which files/directories are sent to the client. However, the scp client only performs cursory validation of the object name returned (only directory traversal attacks are prevented). A malicious scp server (or Man-in-The-Middle attacker) can overwrite arbitrary files in the scp client target directory. If recursive operation (-r) is performed, the server can manipulate subdirectories as well (for example, to overwrite the .ssh/authorizedkeys file).
Other sources
OpenSSH has a vulnerability in the scp client utility. Due to the scp implementation being derived from 1983 rcp, the server chooses which files/directories are sent to the client. However, scp client only perform cursory validation of the object name returned (only directory traversal attacks are prevented). A malicious scp server can overwrite arbitrary files in the scp client target directory. If recursive operation (-r) is performed, the server can manipulate subdirectories as well (for example overwrite .ssh/authorizedkeys).
External Reference:
https://sintonen.fi/advisories/scp-client-multiple-vulnerabilities.txt
Proposed Patch:
https://sintonen.fi/advisories/scp-name-validator.patch
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/opensshto a version that resolves this vulnerability.Fixed in 1:8.4p1-5+deb11u3Fixed in 1:8.4p1-5+deb11u7Fixed in 1:9.2p1-2+deb12u10Fixed in 1:9.2p1-2+deb12u9Fixed in 1:10.0p1-7+deb13u4Fixed in 1:10.0p1-7+deb13u2Fixed in 1:10.3p1-5Fixed in 1:10.4p1-2
Event History
Frequently Asked Questions
What is CVE-2019-6111?
CVE-2019-6111 is a vulnerability in OpenSSH that allows directory traversal attacks during file transfers using scp.
What is the severity of CVE-2019-6111?
CVE-2019-6111 has a severity score of 5.9, which is considered medium.
How does CVE-2019-6111 impact OpenSSH?
CVE-2019-6111 allows an attacker to potentially overwrite or retrieve arbitrary files on the server through scp file transfers.
Which versions of OpenSSH are affected by CVE-2019-6111?
OpenSSH versions 7.9 and prior are affected by CVE-2019-6111.
Is there a fix for CVE-2019-6111?
Yes, updating to OpenSSH version 7.9p1-10+deb10u2 or later will fix the vulnerability.