{"id":"UBUNTU-CVE-2021-31800","details":"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.","modified":"2026-05-20T16:04:58.045423947Z","published":"2021-05-05T11:15:00Z","upstream":["CVE-2021-31800"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-31800"},{"type":"REPORT","url":"https://github.com/SecureAuthCorp/impacket/commit/49c643bf66620646884ed141c94e5fdd85bcdd2f"},{"type":"REPORT","url":"https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2008"},{"type":"REPORT","url":"https://github.com/SecureAuthCorp/impacket/releases"},{"type":"REPORT","url":"https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L876"},{"type":"REPORT","url":"https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L2958"},{"type":"REPORT","url":"https://github.com/SecureAuthCorp/impacket/blob/cb6d43a677c338db930bc4e9161620832c1ec624/impacket/smbserver.py#L3485"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-31800"}],"affected":[{"package":{"name":"impacket","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/impacket?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.12-1"],"ecosystem_specific":{"binaries":[{"binary_name":"python-impacket","binary_version":"0.9.12-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-31800.json"}},{"package":{"name":"impacket","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/impacket?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.15-1"],"ecosystem_specific":{"binaries":[{"binary_name":"python-impacket","binary_version":"0.9.15-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-31800.json"}},{"package":{"name":"impacket","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/impacket?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.15-5","0.9.20-4","0.9.20-5"],"ecosystem_specific":{"binaries":[{"binary_version":"0.9.20-5","binary_name":"python3-impacket"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-31800.json"}},{"package":{"name":"impacket","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/impacket?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.22-2","0.9.24-1"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-impacket","binary_version":"0.9.24-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-31800.json"}},{"package":{"name":"impacket","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/impacket?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.11.0-1","0.11.0-2"],"ecosystem_specific":{"binaries":[{"binary_version":"0.11.0-2","binary_name":"python3-impacket"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-31800.json"}},{"package":{"name":"impacket","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/impacket?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.12.0-3"],"ecosystem_specific":{"binaries":[{"binary_version":"0.12.0-3","binary_name":"python3-impacket"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-31800.json"}},{"package":{"name":"impacket","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/impacket?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.12.0-3","0.13.0-1","0.13.0-2"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-impacket","binary_version":"0.13.0-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-31800.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}