Every CVE Search/ Get API key

CVE-2021-31800

Path traversal in impacket

9.8 CriticalPublic exploitFix available

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

19.4%Up 16.9 points since May 5, 2021
90%50%10%1%

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 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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

Affected packages
PackageAffectedFixed
impacket
PyPI
before 0.9.23
0.9.23
py3-impacket
Alpine:v3.14
before 0.9.23-r0
0.9.23-r0
py3-impacket
Alpine:v3.15
before 0.9.23-r0
0.9.23-r0
py3-impacket
Alpine:v3.16
before 0.9.23-r0
0.9.23-r0
py3-impacket
Alpine:v3.17
before 0.9.23-r0
0.9.23-r0
py3-impacket
Alpine:v3.18
before 0.9.23-r0
0.9.23-r0
py3-impacket
Alpine:v3.19
before 0.9.23-r0
0.9.23-r0
py3-impacket
Alpine:v3.20
before 0.9.23-r0
0.9.23-r0
py3-impacket
Alpine:v3.21
before 0.9.23-r0
0.9.23-r0
py3-impacket
Alpine:v3.22
before 0.9.23-r0
0.9.23-r0
Show 17 moreShow less
Affected packages
PackageAffectedFixed
py3-impacket
Alpine:v3.23
before 0.9.23-r0
0.9.23-r0
py3-impacket
Alpine:v3.24
before 0.9.23-r0
0.9.23-r0
impacket
Debian:12
before 0.9.22-2
0.9.22-2
impacket
Debian:13
before 0.9.22-2
0.9.22-2
impacket
Debian:14
before 0.9.22-2
0.9.22-2
impacket
PyPI
before 0.9.23, plus listed versions
0.9.100.9.110.9.120.9.130.9.14
Show 7 moreShow less
0.9.150.9.170.9.180.9.190.9.200.9.210.9.22
0.9.23
impacket
PyPI
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 less
0.9.170.9.180.9.190.9.200.9.210.9.22
0.9.23
impacket
Ubuntu:16.04:LTS
All versions, plus listed versions
0.9.12-1
None known
impacket
Ubuntu:18.04:LTS
All versions, plus listed versions
0.9.15-1
None known
impacket
Ubuntu:20.04:LTS
All versions, plus listed versions
0.9.15-50.9.20-40.9.20-5
None known
impacket
Ubuntu:22.04:LTS
All versions, plus listed versions
0.9.22-20.9.24-1
None known
impacket
Ubuntu:24.04:LTS
All versions, plus listed versions
0.11.0-10.11.0-2
None known
impacket
Ubuntu:25.10
All versions, plus listed versions
0.12.0-3
None known
impacket
Ubuntu:26.10
All versions, plus listed versions
0.13.0-2
None known
impacket
Ubuntu:26.04:LTS
All versions, plus listed versions
0.12.0-30.13.0-10.13.0-2
None known
python-impacket
openSUSE:Tumbleweed
before 0.11.0-3.3
0.11.0-3.3
python-impacket
openSUSE: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.

Public exploits
SourceLinkDate
PoC in GitHubp0dalirius/CVE-2021-31800-Impacket-SMB-Server-Arbitrary-file-read-write2022-08-28
PoC in GitHubLouzogh/CVE-2021-318002022-09-02

History

History
RecordedChangedSources
affected, facts
affected, aliases, exploits, referencesOSV
aliasesEUVD
first indexedCVE 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

Show 15 moreShow less
MoveEnter Open