{"id":"UBUNTU-CVE-2021-3504","details":"A flaw was found in the hivex library in versions before 1.3.20. It is caused due to a lack of bounds check within the hivex_open function. An attacker could input a specially crafted Windows Registry (hive) file which would cause hivex to read memory beyond its normal bounds or cause the program to crash. The highest threat from this vulnerability is to system availability.","modified":"2026-05-20T16:06:28.126665218Z","published":"2021-05-11T23:15:00Z","related":["USN-5148-1","USN-5148-2"],"upstream":["CVE-2021-3504"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-3504"},{"type":"REPORT","url":"https://listman.redhat.com/archives/libguestfs/2021-May/msg00013.html"},{"type":"REPORT","url":"https://github.com/libguestfs/hivex/commit/8f1935733b10d974a1a4176d38dd151ed98cf381"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-5148-1"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-5148-2"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-3504"}],"affected":[{"package":{"name":"hivex","ecosystem":"Ubuntu:Pro:14.04:LTS","purl":"pkg:deb/ubuntu/hivex?arch=source&distro=trusty%2Fesm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.9-2ubuntu0.1~esm1"}]}],"versions":["1.3.7-5","1.3.8-1","1.3.8-1build1","1.3.9-1","1.3.9-2","1.3.9-2build1"],"ecosystem_specific":{"binaries":[{"binary_name":"libhivex-bin","binary_version":"1.3.9-2ubuntu0.1~esm1"},{"binary_name":"libhivex-ocaml","binary_version":"1.3.9-2ubuntu0.1~esm1"},{"binary_version":"1.3.9-2ubuntu0.1~esm1","binary_name":"libhivex0"},{"binary_name":"libwin-hivex-perl","binary_version":"1.3.9-2ubuntu0.1~esm1"},{"binary_version":"1.3.9-2ubuntu0.1~esm1","binary_name":"python-hivex"},{"binary_version":"1.3.9-2ubuntu0.1~esm1","binary_name":"python3-hivex"},{"binary_name":"ruby-hivex","binary_version":"1.3.9-2ubuntu0.1~esm1"}],"availability":"Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"}},{"package":{"name":"hivex","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/hivex?arch=source&distro=esm-apps%2Fxenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.13-1ubuntu0.1~esm1"}]}],"versions":["1.3.11-1build1","1.3.12-1","1.3.13-1","1.3.13-1build1","1.3.13-1build2","1.3.13-1build3"],"ecosystem_specific":{"binaries":[{"binary_name":"libhivex-bin","binary_version":"1.3.13-1ubuntu0.1~esm1"},{"binary_name":"libhivex-ocaml","binary_version":"1.3.13-1ubuntu0.1~esm1"},{"binary_name":"libhivex0","binary_version":"1.3.13-1ubuntu0.1~esm1"},{"binary_name":"libwin-hivex-perl","binary_version":"1.3.13-1ubuntu0.1~esm1"},{"binary_name":"python-hivex","binary_version":"1.3.13-1ubuntu0.1~esm1"},{"binary_name":"python3-hivex","binary_version":"1.3.13-1ubuntu0.1~esm1"},{"binary_name":"ruby-hivex","binary_version":"1.3.13-1ubuntu0.1~esm1"}],"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"}},{"package":{"name":"hivex","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/hivex?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.15-1ubuntu0.1"}]}],"versions":["1.3.14-1build4","1.3.14-3build1","1.3.14-4","1.3.14-4build1","1.3.15-1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_version":"1.3.15-1ubuntu0.1","binary_name":"libhivex-bin"},{"binary_name":"libhivex-ocaml","binary_version":"1.3.15-1ubuntu0.1"},{"binary_version":"1.3.15-1ubuntu0.1","binary_name":"libhivex0"},{"binary_version":"1.3.15-1ubuntu0.1","binary_name":"libwin-hivex-perl"},{"binary_version":"1.3.15-1ubuntu0.1","binary_name":"python-hivex"},{"binary_version":"1.3.15-1ubuntu0.1","binary_name":"python3-hivex"},{"binary_name":"ruby-hivex","binary_version":"1.3.15-1ubuntu0.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"}},{"package":{"name":"hivex","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/hivex?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.18-2ubuntu0.1"}]}],"versions":["1.3.18-1","1.3.18-1build1","1.3.18-2","1.3.18-2build1","1.3.18-2build2"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libhivex-bin","binary_version":"1.3.18-2ubuntu0.1"},{"binary_name":"libhivex-ocaml","binary_version":"1.3.18-2ubuntu0.1"},{"binary_name":"libhivex0","binary_version":"1.3.18-2ubuntu0.1"},{"binary_version":"1.3.18-2ubuntu0.1","binary_name":"libwin-hivex-perl"},{"binary_name":"python3-hivex","binary_version":"1.3.18-2ubuntu0.1"},{"binary_version":"1.3.18-2ubuntu0.1","binary_name":"ruby-hivex"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"}},{"package":{"name":"hivex","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/hivex?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.3.19-1ubuntu3","1.3.21-1ubuntu1","1.3.21-1ubuntu4","1.3.21-1ubuntu5"],"ecosystem_specific":{"binaries":[{"binary_name":"libhivex-bin","binary_version":"1.3.21-1ubuntu5"},{"binary_name":"libhivex-ocaml","binary_version":"1.3.21-1ubuntu5"},{"binary_name":"libhivex0","binary_version":"1.3.21-1ubuntu5"},{"binary_name":"libwin-hivex-perl","binary_version":"1.3.21-1ubuntu5"},{"binary_name":"python3-hivex","binary_version":"1.3.21-1ubuntu5"},{"binary_name":"ruby-hivex","binary_version":"1.3.21-1ubuntu5"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"}},{"package":{"name":"hivex","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/hivex?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.3.23-1build2","1.3.23-1build3","1.3.23-1build4","1.3.23-1build6","1.3.23-1build7"],"ecosystem_specific":{"binaries":[{"binary_version":"1.3.23-1build7","binary_name":"libhivex-bin"},{"binary_name":"libhivex-ocaml","binary_version":"1.3.23-1build7"},{"binary_name":"libhivex0","binary_version":"1.3.23-1build7"},{"binary_name":"libwin-hivex-perl","binary_version":"1.3.23-1build7"},{"binary_version":"1.3.23-1build7","binary_name":"python3-hivex"},{"binary_version":"1.3.23-1build7","binary_name":"ruby-hivex"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"}},{"package":{"name":"hivex","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/hivex?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.3.24-1build4","1.3.24-1build5","1.3.24-1build6"],"ecosystem_specific":{"binaries":[{"binary_name":"libhivex-bin","binary_version":"1.3.24-1build6"},{"binary_version":"1.3.24-1build6","binary_name":"libhivex-ocaml"},{"binary_version":"1.3.24-1build6","binary_name":"libhivex0"},{"binary_name":"libwin-hivex-perl","binary_version":"1.3.24-1build6"},{"binary_name":"python3-hivex","binary_version":"1.3.24-1build6"},{"binary_name":"ruby-hivex","binary_version":"1.3.24-1build6"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"}},{"package":{"name":"hivex","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/hivex?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.3.24-1build6","1.3.24-1build7","1.3.24-2","1.3.24-2build1","1.3.24-2.1","1.3.24-2.1build1","1.3.24-2.1build2"],"ecosystem_specific":{"binaries":[{"binary_name":"libhivex-bin","binary_version":"1.3.24-2.1build2"},{"binary_name":"libhivex-ocaml","binary_version":"1.3.24-2.1build2"},{"binary_version":"1.3.24-2.1build2","binary_name":"libhivex0"},{"binary_version":"1.3.24-2.1build2","binary_name":"libwin-hivex-perl"},{"binary_name":"python3-hivex","binary_version":"1.3.24-2.1build2"},{"binary_version":"1.3.24-2.1build2","binary_name":"ruby-hivex"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L"},{"type":"Ubuntu","score":"medium"}]}