Vulnerability · Published May 5, 2021 · Assigned by mitre

CVE-2021-31800

Critical 9.8

In plain English

A critical-severity security flaw in the py3-impacket package (Alpine). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 19.4% (higher than 97% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)9.8Critical
Exploit odds (30 days)19.4%top 2.6% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack tooling1Public PoC

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20py3-impacket0.9.23-r0ALPINE-CVE-2021-31800
Alpine:v3.21py3-impacket0.9.23-r0ALPINE-CVE-2021-31800
Alpine:v3.22py3-impacket0.9.23-r0ALPINE-CVE-2021-31800
Alpine:v3.23py3-impacket0.9.23-r0ALPINE-CVE-2021-31800
Alpine:v3.24py3-impacket0.9.23-r0ALPINE-CVE-2021-31800
Debian:12impacket0.9.22-2DEBIAN-CVE-2021-31800
Debian:13impacket0.9.22-2DEBIAN-CVE-2021-31800
Debian:14impacket0.9.22-2DEBIAN-CVE-2021-31800
PyPIimpacket0.9.23PYSEC-2021-17
PyPIimpacket0.9.23GHSA-mj63-64x7-57xf
Ubuntu:22.04:LTSimpacketno fix listedUBUNTU-CVE-2021-31800
Ubuntu:24.04:LTSimpacketno fix listedUBUNTU-CVE-2021-31800
Ubuntu:25.10impacketno fix listedUBUNTU-CVE-2021-31800
Ubuntu:26.04:LTSimpacketno fix listedUBUNTU-CVE-2021-31800
Ubuntu:26.10impacketno fix listedUBUNTU-CVE-2021-31800

Affected products (as reported)

VendorProductVersions
n/a n/a n/a

References