{"id":"CVE-2021-31800","aliases":["ALPINE-CVE-2021-31800","DEBIAN-CVE-2021-31800","EUVD-2021-0100","GHSA-mj63-64x7-57xf","PYSEC-2021-17","UBUNTU-CVE-2021-31800","openSUSE-SU-2024:11232-1","openSUSE-SU-2024:14142-1","openSUSE-SU-2026:12011-1"],"status":"published","title":"Path traversal in impacket","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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-12","score":0.19409,"percentile":0.97401,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-22"],"published":"2021-05-05T10:24:10Z","modified":"2026-11-03T06:32:40Z","exploits":[{"source":"pocgithub","id":"p0dalirius/CVE-2021-31800-Impacket-SMB-Server-Arbitrary-file-read-write","title":"p0dalirius/CVE-2021-31800-Impacket-SMB-Server-Arbitrary-file-read-write","date":"2022-08-28","url":"https://github.com/p0dalirius/CVE-2021-31800-Impacket-SMB-Server-Arbitrary-file-read-write"},{"source":"pocgithub","id":"Louzogh/CVE-2021-31800","title":"Louzogh/CVE-2021-31800","date":"2022-09-02","url":"https://github.com/Louzogh/CVE-2021-31800"}],"fixes":[{"ecosystem":"PyPI","package":"impacket","fixed_in":["0.9.23"],"sources":["ghsa","osv"]},{"ecosystem":"Alpine:v3.14","package":"py3-impacket","fixed_in":["0.9.23-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.15","package":"py3-impacket","fixed_in":["0.9.23-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.16","package":"py3-impacket","fixed_in":["0.9.23-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.17","package":"py3-impacket","fixed_in":["0.9.23-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.18","package":"py3-impacket","fixed_in":["0.9.23-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.19","package":"py3-impacket","fixed_in":["0.9.23-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"py3-impacket","fixed_in":["0.9.23-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.21","package":"py3-impacket","fixed_in":["0.9.23-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.22","package":"py3-impacket","fixed_in":["0.9.23-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.23","package":"py3-impacket","fixed_in":["0.9.23-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.24","package":"py3-impacket","fixed_in":["0.9.23-r0"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"impacket","fixed_in":["0.9.22-2"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"impacket","fixed_in":["0.9.22-2"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"impacket","fixed_in":["0.9.22-2"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"python-impacket","fixed_in":["0.11.0-3.3"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23"}]}]},{"source":"osv","ecosystem":"Alpine:v3.14","package":"py3-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.15","package":"py3-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.16","package":"py3-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.17","package":"py3-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.18","package":"py3-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.19","package":"py3-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"py3-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.21","package":"py3-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.22","package":"py3-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.23","package":"py3-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.24","package":"py3-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23-r0"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.22-2"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.22-2"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.22-2"}]}]},{"source":"osv","ecosystem":"PyPI","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.23"}]}],"versions":["0.9.10","0.9.11","0.9.12","0.9.13","0.9.14","0.9.15","0.9.17","0.9.18","0.9.19","0.9.20","0.9.21","0.9.22"]},{"source":"osv","ecosystem":"PyPI","package":"impacket","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"49c643bf66620646884ed141c94e5fdd85bcdd2f"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0.9.10"},{"fixed":"0.9.23"}]}],"versions":["0.9.10","0.9.11","0.9.12","0.9.13","0.9.14","0.9.15","0.9.17","0.9.18","0.9.19","0.9.20","0.9.21","0.9.22"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.12-1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.15-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.15-5","0.9.20-4","0.9.20-5"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.22-2","0.9.24-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.11.0-1","0.11.0-2"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.12.0-3"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.13.0-2"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.12.0-3","0.13.0-1","0.13.0-2"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.11.0-3.3"}]}]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-impacket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.13.1-1.2"}]}],"bundled":2}],"products":[{"vendor":"fedoraproject","product":"fedora"},{"vendor":"secureauth","product":"impacket"}],"references":[{"url":"https://github.com/SecureAuthCorp/impacket/releases","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L876","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L3485","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2008","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2958","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/SecureAuthCorp/impacket/commit/49c643bf66620646884ed141c94e5fdd85bcdd2f","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31800","tags":["advisory"]},{"url":"https://github.com/SecureAuthCorp/impacket/commit/99bd29e3995c254e2d6f6c2e3454e4271665955a","tags":["web"]},{"url":"https://github.com/SecureAuthCorp/impacket/releases/tag/impacket_0_9_23","tags":["web"]},{"url":"https://github.com/advisories/GHSA-mj63-64x7-57xf","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/impacket/PYSEC-2021-17.yaml","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG","tags":["web"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2021-31800","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-31800","tags":["advisory"]},{"url":"https://github.com/fortra/impacket","tags":["package"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UF56LYB27LHEIFJTFHU3M75NMNNK2SCG/","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IPXDPWCAPVX3UWYZ3N2T5OLBSBBUHJP6/","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KRV2C5DATXBHG6TF6CEEX54KZ75THQS3/","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2021-31800","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-31800","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2021-31800","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2020-17049","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2021-31800","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.","status":"published","published":"2021-05-05T10:24:10Z","modified":"2024-08-03T23:10:31.028Z","updated_at":"2026-11-02T14:33:05.665371Z"}],"euvd":[{"id":"EUVD-2021-0100","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.","status":"published","published":"2021-05-05T10:24:10Z","modified":"2024-08-03T23:10:31Z","updated_at":"2026-11-03T03:24:37.97373Z"}],"ghsa":[{"id":"GHSA-mj63-64x7-57xf","title":"Path traversal in impacket","description":"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.","status":"published","published":"2021-06-18T18:43:14Z","modified":"2024-09-23T17:06:08Z","cvss":[{"version":"4.0","score":9.3,"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","level":"critical"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:38:05.526697Z"}],"nvd":[{"id":"CVE-2021-31800","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.","status":"published","published":"2021-05-05T11:15:07.397Z","modified":"2026-06-17T03:52:15.463Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:06:52.81233Z"}],"osv":[{"id":"ALPINE-CVE-2021-31800","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.","status":"published","published":"2021-05-05T11:15:07.397Z","modified":"2026-11-03T06:32:40.345367367Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-03T07:17:02.90744Z"},{"id":"CVE-2021-31800","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.","status":"published","published":"2021-05-05T11:15:07.397Z","modified":"2026-10-20T10:54:41.928123999Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:19.483607Z"},{"id":"DEBIAN-CVE-2021-31800","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.","status":"published","published":"2021-05-05T11:15:07.397Z","modified":"2026-10-23T18:03:14.233329216Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:34.94143Z"},{"id":"GHSA-mj63-64x7-57xf","title":"Path traversal in impacket","description":"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.","status":"published","published":"2021-06-18T18:43:14Z","modified":"2025-02-13T05:31:13.158552Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"},{"version":"4.0","score":9.3,"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","level":"critical"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:46:51.811331Z"},{"id":"UBUNTU-CVE-2021-31800","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.","status":"published","published":"2021-05-05T11:15:00Z","modified":"2026-10-17T12:55:46.337240963Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:27.332852Z"},{"id":"openSUSE-SU-2024:11232-1","title":"python36-impacket-0.9.23-1.2 on GA media","description":"These are all security issues fixed in the python36-impacket-0.9.23-1.2 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T03:47:09.288715Z","updated_at":"2026-11-02T16:58:34.894275Z"},{"id":"openSUSE-SU-2024:14142-1","title":"python310-impacket-0.11.0-3.3 on GA media","description":"These are all security issues fixed in the python310-impacket-0.11.0-3.3 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-07-12T00:00:00Z","modified":"2026-02-04T03:24:05.175505Z","updated_at":"2026-11-02T16:58:36.662953Z"},{"id":"openSUSE-SU-2026:12011-1","title":"python313-impacket-0.13.1-1.2 on GA media","description":"These are all security issues fixed in the python313-impacket-0.13.1-1.2 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-10-04T00:00:00Z","modified":"2026-10-05T10:15:46.425947226Z","updated_at":"2026-11-02T16:58:40.245664Z"},{"id":"PYSEC-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.","status":"published","published":"2021-05-05T11:15:00Z","modified":"2023-11-08T04:05:50.91152Z","updated_at":"2026-11-02T15:52:52.682031Z"}]}}
