CVE-2021-31800
Path traversal in impacket
Reported by mitre · Published May 5, 2021
impacket is fixed in 0.9.23 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| impacket | PyPI | 0.9.23 |
| py3-impacket | Alpine | 0.9.23-r0 |
| impacket | secureauth | 0.9.22 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| alpine | py3-impacket | 0 |
| PyPI | impacket | 0 |
| arch | impacket | 0 |
| n/a | n/a | * |
Timeline
- May 5, 2021 EPSS Score (30 in total, the first dated here)
- May 5, 2021 CVE Published
- Feb 13, 2025 CVE Updated
- Mar 9, 2026 Security Advisory
- Aug 1, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-31800
vulnetix vdb fixes CVE-2021-31800
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-31800/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- FEDORA-2021-52dfb60726 vendor-advisoryx_refsource_FEDORA
- FEDORA-2021-ab09c9a7a1 vendor-advisoryx_refsource_FEDORA
- FEDORA-2021-888ccfd5b6 vendor-advisoryx_refsource_FEDORA
- https://nvd.nist.gov/vuln/detail/CVE-2021-31800 advisory
- https://github.com/advisories/GHSA-mj63-64x7-57xf advisory
- https://github.com/SecureAuthCorp/impacket/commit/99bd29e3995c254e2d6f6c2e3454e4271665955a patch
- https://github.com/SecureAuthCorp/impacket/releases/tag/impacket_0_9_23 url
- https://github.com/fortra/impacket url
- https://github.com/pypa/advisory-database/tree/main/vulns/impacket/PYSEC-2021-17.yaml advisory
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6 url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3 url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG url