{"id":"CVE-2021-31800","aliases":["CVE-2021-31800","GHSA-mj63-64x7-57xf","PYSEC-2021-17"],"related":[],"kind":"vulnerability","state":"published","title":"Path traversal in impacket","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Se presentan múltiples vulnerabilidades de salto de ruta en el archivo smbserver.py en Impacket versiones hasta 0.9.22.&#xa0;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 ../.&#xa0;Esto podría potencialmente ser abusado para lograr una ejecución de código arbitraria al reemplazar /etc/shadow o una clave SSH autorizada","source":"nvd"}],"published":"2021-05-05T10:24:10.000Z","modified":"2026-06-17T03:52:15.463Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.9.23"}],"ecosystem":"PyPI","package":"impacket","purl":"pkg:pypi/impacket","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"0.9.22"}],"vendor":"secureauth","product":"impacket","cpe":"cpe:2.3:a:secureauth:impacket:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"32"},{"status":"affected","version":"33"},{"status":"affected","version":"34"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"49c643bf66620646884ed141c94e5fdd85bcdd2f"},{"type":"ecosystem","introduced":"0.9.10","status":"affected","fixed":"0.9.23"}],"ecosystem":"PyPI","package":"impacket","purl":"pkg:pypi/impacket","repo":"https://github.com/SecureAuthCorp/impacket","source":"pysec"}],"references":[{"url":"https://github.com/SecureAuthCorp/impacket/releases","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L876","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L3485","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2008","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2958","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/SecureAuthCorp/impacket/commit/49c643bf66620646884ed141c94e5fdd85bcdd2f","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31800","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/SecureAuthCorp/impacket/commit/99bd29e3995c254e2d6f6c2e3454e4271665955a","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/SecureAuthCorp/impacket/releases/tag/impacket_0_9_23","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-mj63-64x7-57xf","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/fortra/impacket","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/impacket/PYSEC-2021-17.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG/","tags":["web"],"sources":["pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6/","tags":["web"],"sources":["pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3/","tags":["web"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-31800","url":"https://www.cve.org/CVERecord?id=CVE-2021-31800","licence":"CVE Terms of Use","modified":"2024-08-03T23:10:31.028Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mj63-64x7-57xf","url":"https://github.com/advisories/GHSA-mj63-64x7-57xf","licence":"CC-BY-4.0","modified":"2025-02-13T05:31:13.158Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-31800","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31800","licence":"Public domain","modified":"2026-06-17T03:52:15.463Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-17","url":"https://osv.dev/vulnerability/PYSEC-2021-17","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:50.911Z"}],"updatedAt":"2026-11-25T22:58:01.138Z","epss":{"score":0.18916,"percentile":0.9736,"date":"2026-12-01T12:00:22.000Z"}}