CVE-2021-31800
CRITICAL 9.8CVSS 3.1Path traversal in impacket
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.
- Published
- 5 May 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-22
- Also known as
- GHSA-mj63-64x7-57xfPYSEC-2021-17
- Sources
- NVDJSONOSV GHSA-mj63-64x7-57xfJSONOSV PYSEC-2021-17JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | secureauth | impacketcpe:2.3:a:secureauth:impacket:*:*:*:*:*:*:*:* |
<= 0.9.22 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:* |
= 32 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* |
= 33 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* |
= 34 | |
| OSV | PyPI | impacket | < 0.9.23 | 0.9.23 |
| OSV | PyPI | impacket | >= 0.9.10, < 0.9.23 | 0.9.23 |
References
- https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2008 · Third Party Advisory, WEB
- https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2958 · Third Party Advisory, WEB
- https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L3485 · Third Party Advisory, WEB
- https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L876 · Third Party Advisory, WEB
- https://github.com/SecureAuthCorp/impacket/commit/49c643bf66620646884ed141c94e5fdd85bcdd2f · Patch, Third Party Advisory, WEB, FIX
- https://github.com/SecureAuthCorp/impacket/releases · Release Notes, Third Party Advisory, WEB
- https://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://nvd.nist.gov/vuln/detail/CVE-2021-31800 · ADVISORY
- https://github.com/SecureAuthCorp/impacket/commit/99bd29e3995c254e2d6f6c2e3454e4271665955a · WEB
- https://github.com/SecureAuthCorp/impacket/releases/tag/impacket_0_9_23 · WEB
- https://github.com/advisories/GHSA-mj63-64x7-57xf · ADVISORY
- https://github.com/fortra/impacket · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/impacket/PYSEC-2021-17.yaml · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6 · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3 · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 5 May 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 5 May 2021)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 18 Jun 2021)