CVE-2021-31800
published 2021-05-05CVE-2021-31800: Multiple path traversal vulnerabilities exist in smbserver.py in Impacket through 0.9.22. An attacker that connects to a running smbserver instance can list…
PriorityP269critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EPSS
19.26%
97.0th percentile
Multiple path traversal vulnerabilities exist in smbserver.py in Impacket through 0.9.22. An attacker that connects to a running smbserver instance can list and write to arbitrary files via ../ directory traversal. This could potentially be abused to achieve arbitrary code execution by replacing /etc/shadow or an SSH authorized key.
Affected
10 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | impacket | < impacket 0.9.22-2 (bookworm) | impacket 0.9.22-2 (bookworm) |
| fedoraproject | fedora | — | — |
| fedoraproject | fedora | — | — |
| fedoraproject | fedora | — | — |
| secureauth | impacket | <= 0.9.22 | — |
| secureauth | impacket | >= 0 < 0.9.22-2 | 0.9.22-2 |
| secureauth | impacket | >= 0 < 0.9.22-2 | 0.9.22-2 |
| secureauth | impacket | >= 0 < 0.9.22-2 | 0.9.22-2 |
| secureauth | impacket | >= 0 < 0.9.22-2 | 0.9.22-2 |
| secureauth | impacket | >= 0 < 0.9.23 | 0.9.23 |
Detection & IOCsextracted from sources · hover to see the quote
- →Path traversal attempts using '../' sequences in SMB requests to a running Impacket smbserver instance should be flagged as malicious ↗
- →Monitor for unauthorized writes to sensitive files such as /etc/shadow or SSH authorized_keys files, which may indicate exploitation of this vulnerability for privilege escalation or persistence ↗
- ·Vulnerability affects Impacket smbserver.py through version 0.9.22 only; fixed in 0.9.22-2 (Debian packages). Verify the running Impacket version before applying detection logic. ↗
- ·The vulnerability is scoped as local (attacker must be able to connect to the running smbserver instance), limiting remote exploitation surface. ↗
CVSS provenance
nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
osv9.8CRITICAL
vendor_debian9.8CRITICAL
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Path traversal in impacket
ghsa·2021-06-18
CVE-2021-31800 [CRITICAL] CWE-22 Path traversal in impacket
Path traversal in impacket
Multiple path traversal vulnerabilities exist in smbserver.py in Impacket before 0.9.23. An attacker that connects to a running smbserver instance can list and write to arbitrary files via ../ directory traversal. This could potentially be abused to achieve arbitrary code execution by replacing /etc/shadow or an SSH authorized key.
OSV
Path traversal in impacket
osv·2021-06-18
CVE-2021-31800 [CRITICAL] Path traversal in impacket
Path traversal in impacket
Multiple path traversal vulnerabilities exist in smbserver.py in Impacket before 0.9.23. An attacker that connects to a running smbserver instance can list and write to arbitrary files via ../ directory traversal. This could potentially be abused to achieve arbitrary code execution by replacing /etc/shadow or an SSH authorized key.
OSV
CVE-2021-31800: Multiple path traversal vulnerabilities exist in smbserver
osv·2021-05-05·CVSS 9.8
CVE-2021-31800 [CRITICAL] CVE-2021-31800: Multiple path traversal vulnerabilities exist in smbserver
Multiple path traversal vulnerabilities exist in smbserver.py in Impacket through 0.9.22. An attacker that connects to a running smbserver instance can list and write to arbitrary files via ../ directory traversal. This could potentially be abused to achieve arbitrary code execution by replacing /etc/shadow or an SSH authorized key.
Debian
CVE-2021-31800: impacket - Multiple path traversal vulnerabilities exist in smbserver.py in Impacket throug...
vendor_debian·2021·CVSS 9.8
CVE-2021-31800 [CRITICAL] CVE-2021-31800: impacket - Multiple path traversal vulnerabilities exist in smbserver.py in Impacket throug...
Multiple path traversal vulnerabilities exist in smbserver.py in Impacket through 0.9.22. An attacker that connects to a running smbserver instance can list and write to arbitrary files via ../ directory traversal. This could potentially be abused to achieve arbitrary code execution by replacing /etc/shadow or an SSH authorized key.
Scope: local
bookworm: resolved (fixed in 0.9.22-2)
bullseye: resolved (fixed in 0.9.22-2)
forky: resolved (fixed in 0.9.22-2)
sid: resolved (fixed in 0.9.22-2)
trixie: resolved (fixed in 0.9.22-2)
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2008https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2958https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L3485https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L876https://github.com/SecureAuthCorp/impacket/commit/49c643bf66620646884ed141c94e5fdd85bcdd2fhttps://github.com/SecureAuthCorp/impacket/releaseshttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG/https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2008https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2958https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L3485https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L876https://github.com/SecureAuthCorp/impacket/commit/49c643bf66620646884ed141c94e5fdd85bcdd2fhttps://github.com/SecureAuthCorp/impacket/releaseshttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG/
2021-05-05
Published