CVE-2021-31800
Path 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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2021-31800- 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 - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-22
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2021-31800- Updated
- 2026-11-02
EUVDEUVD-2021-0100 No score
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.
- Record
EUVD-2021-0100- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-mj63-64x7-57xf
9.3
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.
- Record
GHSA-mj63-64x7-57xf- CVSS 4.0
- 9.3 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 - 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 - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVALPINE-CVE-2021-31800
9.8
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.
- Record
ALPINE-CVE-2021-31800- 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 - Updated
- 2026-11-03
OSV
9.8
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.
- Record
CVE-2021-31800- 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 - Updated
- 2026-11-02
Show 7 moreShow less
OSVDEBIAN-CVE-2021-31800
9.8
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.
- Record
DEBIAN-CVE-2021-31800- 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 - Updated
- 2026-11-02
OSVGHSA-mj63-64x7-57xf
9.3
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.
- Record
GHSA-mj63-64x7-57xf- CVSS 4.0
- 9.3 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 - 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 - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-31800
9.8
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.
- Record
UBUNTU-CVE-2021-31800- 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 - Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11232-1 No score
python36-impacket-0.9.23-1.2 on GA media
These are all security issues fixed in the python36-impacket-0.9.23-1.2 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11232-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:14142-1 No score
python310-impacket-0.11.0-3.3 on GA media
These are all security issues fixed in the python310-impacket-0.11.0-3.3 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:14142-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:12011-1 No score
python313-impacket-0.13.1-1.2 on GA media
These are all security issues fixed in the python313-impacket-0.13.1-1.2 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:12011-1- Updated
- 2026-11-02
OSVPYSEC-2021-17 No score
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.
- Record
PYSEC-2021-17- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
impacketPyPI |
before 0.9.23 | 0.9.23 |
py3-impacketAlpine:v3.14 |
before 0.9.23-r0 | 0.9.23-r0 |
py3-impacketAlpine:v3.15 |
before 0.9.23-r0 | 0.9.23-r0 |
py3-impacketAlpine:v3.16 |
before 0.9.23-r0 | 0.9.23-r0 |
py3-impacketAlpine:v3.17 |
before 0.9.23-r0 | 0.9.23-r0 |
py3-impacketAlpine:v3.18 |
before 0.9.23-r0 | 0.9.23-r0 |
py3-impacketAlpine:v3.19 |
before 0.9.23-r0 | 0.9.23-r0 |
py3-impacketAlpine:v3.20 |
before 0.9.23-r0 | 0.9.23-r0 |
py3-impacketAlpine:v3.21 |
before 0.9.23-r0 | 0.9.23-r0 |
py3-impacketAlpine:v3.22 |
before 0.9.23-r0 | 0.9.23-r0 |
Show 17 moreShow less
| Package | Affected | Fixed |
|---|---|---|
py3-impacketAlpine:v3.23 |
before 0.9.23-r0 | 0.9.23-r0 |
py3-impacketAlpine:v3.24 |
before 0.9.23-r0 | 0.9.23-r0 |
impacketDebian:12 |
before 0.9.22-2 | 0.9.22-2 |
impacketDebian:13 |
before 0.9.22-2 | 0.9.22-2 |
impacketDebian:14 |
before 0.9.22-2 | 0.9.22-2 |
impacketPyPI |
before 0.9.23, plus listed versions 0.9.100.9.110.9.120.9.130.9.14 Show 7 moreShow less0.9.150.9.170.9.180.9.190.9.200.9.210.9.22 |
0.9.23 |
impacketPyPI |
0.9.10 up to 0.9.23, plus listed versions 0.9.110.9.120.9.130.9.140.9.15 Show 6 moreShow less0.9.170.9.180.9.190.9.200.9.210.9.22 |
0.9.23 |
impacketUbuntu:16.04:LTS |
All versions, plus listed versions 0.9.12-1 |
None known |
impacketUbuntu:18.04:LTS |
All versions, plus listed versions 0.9.15-1 |
None known |
impacketUbuntu:20.04:LTS |
All versions, plus listed versions 0.9.15-50.9.20-40.9.20-5 |
None known |
impacketUbuntu:22.04:LTS |
All versions, plus listed versions 0.9.22-20.9.24-1 |
None known |
impacketUbuntu:24.04:LTS |
All versions, plus listed versions 0.11.0-10.11.0-2 |
None known |
impacketUbuntu:25.10 |
All versions, plus listed versions 0.12.0-3 |
None known |
impacketUbuntu:26.10 |
All versions, plus listed versions 0.13.0-2 |
None known |
impacketUbuntu:26.04:LTS |
All versions, plus listed versions 0.12.0-30.13.0-10.13.0-2 |
None known |
python-impacketopenSUSE:Tumbleweed |
before 0.11.0-3.3 | 0.11.0-3.3 |
python-impacketopenSUSE:Tumbleweed From an advisory covering 2 CVEs |
before 0.13.1-1.2 | 0.13.1-1.2 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | p0dalirius/CVE-2021-31800-Impacket-SMB-Server-Arbitrary-file-read-write | 2022-08-28 |
| PoC in GitHub | Louzogh/CVE-2021-31800 | 2022-09-02 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected, aliases, exploits, references | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-31800 is a critical vulnerability (CVSS 9.8) in Secureauth Impacket, published May 5, 2021. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 19.4%, the 97th percentile. Fixed in impacket 0.9.23.
References
github.com/SecureAuthCorp/impacket/releases
github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py
github.com/SecureAuthCorp/impacket/commit/49c643bf66620646884ed141c94e5fdd85bcdd2f
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6
Show 15 moreShow less
nvd.nist.gov/vuln/detail/CVE-2021-31800
github.com/SecureAuthCorp/impacket/commit/99bd29e3995c254e2d6f6c2e3454e4271665955a
github.com/SecureAuthCorp/impacket/releases/tag/impacket_0_9_23
github.com/advisories/GHSA-mj63-64x7-57xf
github.com/pypa/advisory-database/tree/main/vulns/impacket/PYSEC-2021-17.yaml
lists.fedoraproject.org/archives/list/[email protected]/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6
lists.fedoraproject.org/archives/list/[email protected]/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3
lists.fedoraproject.org/archives/list/[email protected]/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG
security.alpinelinux.org/vuln/CVE-2021-31800
security-tracker.debian.org/tracker/CVE-2021-31800
github.com/fortra/impacket
ubuntu.com/security/CVE-2021-31800
cve.org/CVERecord?id=CVE-2021-31800
suse.com/security/cve/CVE-2021-31800
suse.com/security/cve/CVE-2020-17049