CVE-2021-31800
JSON

9.8critical

Path traversal in impacket

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
18.9% (higher than 97% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-mj63-64x7-57xfPYSEC-2021-17

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

Product or packageVersionsReported by
Unspecified productn/aCVE List
impacket (PyPI)before 0.9.23, before 49c643bf66620646884ed141c94e5fdd85bcdd2f, from 0.9.10 before 0.9.23GitHub Advisory Database, PyPA Advisory Database
secureauth impacketup to 0.9.22NVD
fedoraproject fedora32, 33, 34NVD

All scores

GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHubcritical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

Se presentan múltiples vulnerabilidades de salto de ruta en el archivo smbserver.py en Impacket versiones hasta 0.9.22. Un atacante que se conecta a una instancia de smbserver en ejecución puede enumerar y escribir en archivos arbitrarios por medio de un salto de directorio ../. Esto podría potencialmente ser abusado para lograr una ejecución de código arbitraria al reemplazar /etc/shadow o una clave SSH autorizada

References

https://github.com/SecureAuthCorp/impacket/releasesrelease-notes, third-party-advisory, web
https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L876third-party-advisory, web
https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L3485third-party-advisory, web
https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2008third-party-advisory, web
https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2958third-party-advisory, web
https://github.com/SecureAuthCorp/impacket/commit/49c643bf66620646884ed141c94e5fdd85bcdd2ffix, 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-31800advisory
https://github.com/SecureAuthCorp/impacket/commit/99bd29e3995c254e2d6f6c2e3454e4271665955aweb
https://github.com/SecureAuthCorp/impacket/releases/tag/impacket_0_9_23web

Sources

SourceRecordLicence
CVE ListCVE-2021-31800 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-mj63-64x7-57xf changed 2025-02-13CC-BY-4.0
NVDCVE-2021-31800 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-17 changed 2023-11-08CC-BY-4.0