# CVE-2021-31800: Path traversal in impacket

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 18.9%, higher than 97% of CVEs (2026-12-01)
- Published: 2021-05-05T10:24:10.000Z
- Modified: 2026-06-17T03:52:15.463Z
- Also known as: GHSA-mj63-64x7-57xf, PYSEC-2021-17
- Weaknesses: CWE-22
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- impacket (PyPI): before 0.9.23; before 49c643bf66620646884ed141c94e5fdd85bcdd2f; from 0.9.10 before 0.9.23
- secureauth impacket: up to 0.9.22
- fedoraproject fedora: 32; 33; 34

## Every score

- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Critical `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: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/SecureAuthCorp/impacket/releases> (release-notes, third-party-advisory, web)
- <https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L876> (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#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/commit/49c643bf66620646884ed141c94e5fdd85bcdd2f> (fix, patch, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6/> (vendor-advisory)
- <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)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG/> (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)

## Sources

- CVE List: [CVE-2021-31800](https://www.cve.org/CVERecord?id=CVE-2021-31800), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-mj63-64x7-57xf](https://github.com/advisories/GHSA-mj63-64x7-57xf), CC-BY-4.0, modified 2025-02-13
- NVD: [CVE-2021-31800](https://nvd.nist.gov/vuln/detail/CVE-2021-31800), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-17](https://osv.dev/vulnerability/PYSEC-2021-17), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2021-31800 · Whole record: https://cve.day/CVE-2021-31800.json · Rebuilt by cve.day 2026-11-25T22:58:01.138Z
