hivex — security advisory
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.
- Products
- hivex
- Affected 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, 1.3.14-1build4, 1.3.14-3build1, 1.3.14-4, 1.3.14-4build1, 1.3.15-1, 1.3.18-1, 1.3.18-1build1, 1.3.18-2, 1.3.18-2build1, 1.3.18-2build2, 1.3.19-1ubuntu3, 1.3.21-1ubuntu1, 1.3.21-1ubuntu4, 1.3.21-1ubuntu5, 1.3.23-1build2, 1.3.23-1build3, 1.3.23-1build4, 1.3.23-1build6, 1.3.23-1build7, 1.3.24-1build4, 1.3.24-1build5, 1.3.24-1build6, 1.3.24-1build7, 1.3.24-2, 1.3.24-2.1, 1.3.24-2.1build1, 1.3.24-2.1build2, 1.3.24-2build1, 1.3.24-3build0.1, 1.3.24-3build1, 1.3.7-5, 1.3.8-1, 1.3.8-1build1, 1.3.9-1, 1.3.9-2, 1.3.9-2build1
- Fixed versions
- 1.3.13-1ubuntu0.1~esm1, 1.3.15-1ubuntu0.1, 1.3.18-2ubuntu0.1, 1.3.9-2ubuntu0.1~esm1
- CVEs
- CVE-2021-3504
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 00:44 UTC · Revision 1
Source evidence
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.
osv:UBUNTU-CVE-2021-3504
hivex
Fixed versions: 1.3.9-2ubuntu0.1~esm1
hivex
Fixed versions: 1.3.13-1ubuntu0.1~esm1
hivex
Fixed versions: 1.3.15-1ubuntu0.1
hivex
Fixed versions: 1.3.18-2ubuntu0.1
hivex
Fixed versions: Not specified
hivex
Fixed versions: Not specified
hivex
Fixed versions: Not specified
hivex
Fixed versions: Not specified
hivex
Fixed versions: Not specified
Complete source record
{
"id": "aa502da662eb9cb20f38bb26e5e9a90cb79141c05bfce78b6c89debc01acaecf",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2021-3504",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2021-3504",
"summary": "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.",
"evidence": "osv:UBUNTU-CVE-2021-3504",
"products": [
{
"name": {
"value": "hivex",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.3.9-2ubuntu0.1~esm1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": [
{
"value": "1.3.7-5",
"evidence": "/affected/0/versions"
},
{
"value": "1.3.8-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.3.8-1build1",
"evidence": "/affected/0/versions"
},
{
"value": "1.3.9-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.3.9-2",
"evidence": "/affected/0/versions"
},
{
"value": "1.3.9-2build1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "hivex",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.3.13-1ubuntu0.1~esm1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": [
{
"value": "1.3.11-1build1",
"evidence": "/affected/1/versions"
},
{
"value": "1.3.12-1",
"evidence": "/affected/1/versions"
},
{
"value": "1.3.13-1",
"evidence": "/affected/1/versions"
},
{
"value": "1.3.13-1build1",
"evidence": "/affected/1/versions"
},
{
"value": "1.3.13-1build2",
"evidence": "/affected/1/versions"
},
{
"value": "1.3.13-1build3",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "hivex",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.3.15-1ubuntu0.1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": [
{
"value": "1.3.14-1build4",
"evidence": "/affected/2/versions"
},
{
"value": "1.3.14-3build1",
"evidence": "/affected/2/versions"
},
{
"value": "1.3.14-4",
"evidence": "/affected/2/versions"
},
{
"value": "1.3.14-4build1",
"evidence": "/affected/2/versions"
},
{
"value": "1.3.15-1",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "hivex",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.3.18-2ubuntu0.1",
"evidence": "/affected/3/ranges"
}
],
"affected_versions": [
{
"value": "1.3.18-1",
"evidence": "/affected/3/versions"
},
{
"value": "1.3.18-1build1",
"evidence": "/affected/3/versions"
},
{
"value": "1.3.18-2",
"evidence": "/affected/3/versions"
},
{
"value": "1.3.18-2build1",
"evidence": "/affected/3/versions"
},
{
"value": "1.3.18-2build2",
"evidence": "/affected/3/versions"
}
]
},
{
"name": {
"value": "hivex",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.3.19-1ubuntu3",
"evidence": "/affected/4/versions"
},
{
"value": "1.3.21-1ubuntu1",
"evidence": "/affected/4/versions"
},
{
"value": "1.3.21-1ubuntu4",
"evidence": "/affected/4/versions"
},
{
"value": "1.3.21-1ubuntu5",
"evidence": "/affected/4/versions"
}
]
},
{
"name": {
"value": "hivex",
"evidence": "/affected/5/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.3.23-1build2",
"evidence": "/affected/5/versions"
},
{
"value": "1.3.23-1build3",
"evidence": "/affected/5/versions"
},
{
"value": "1.3.23-1build4",
"evidence": "/affected/5/versions"
},
{
"value": "1.3.23-1build6",
"evidence": "/affected/5/versions"
},
{
"value": "1.3.23-1build7",
"evidence": "/affected/5/versions"
}
]
},
{
"name": {
"value": "hivex",
"evidence": "/affected/6/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.3.24-1build4",
"evidence": "/affected/6/versions"
},
{
"value": "1.3.24-1build5",
"evidence": "/affected/6/versions"
},
{
"value": "1.3.24-1build6",
"evidence": "/affected/6/versions"
}
]
},
{
"name": {
"value": "hivex",
"evidence": "/affected/7/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.3.24-2.1build2",
"evidence": "/affected/7/versions"
},
{
"value": "1.3.24-3build0.1",
"evidence": "/affected/7/versions"
},
{
"value": "1.3.24-3build1",
"evidence": "/affected/7/versions"
}
]
},
{
"name": {
"value": "hivex",
"evidence": "/affected/8/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.3.24-1build6",
"evidence": "/affected/8/versions"
},
{
"value": "1.3.24-1build7",
"evidence": "/affected/8/versions"
},
{
"value": "1.3.24-2",
"evidence": "/affected/8/versions"
},
{
"value": "1.3.24-2build1",
"evidence": "/affected/8/versions"
},
{
"value": "1.3.24-2.1",
"evidence": "/affected/8/versions"
},
{
"value": "1.3.24-2.1build1",
"evidence": "/affected/8/versions"
},
{
"value": "1.3.24-2.1build2",
"evidence": "/affected/8/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "UBUNTU-CVE-2021-3504",
"aliases": [
"UBUNTU-CVE-2021-3504"
],
"metrics": [
{
"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"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.3.9-2ubuntu0.1~esm1"
}
]
}
],
"package": {
"name": "hivex",
"purl": "pkg:deb/ubuntu/hivex?arch=source&distro=trusty%2Fesm",
"ecosystem": "Ubuntu:Pro:14.04:LTS"
},
"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"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"
},
"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_name": "libhivex0",
"binary_version": "1.3.9-2ubuntu0.1~esm1"
},
{
"binary_name": "libwin-hivex-perl",
"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_version": "1.3.9-2ubuntu0.1~esm1"
},
{
"binary_name": "ruby-hivex",
"binary_version": "1.3.9-2ubuntu0.1~esm1"
}
],
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.3.13-1ubuntu0.1~esm1"
}
]
}
],
"package": {
"name": "hivex",
"purl": "pkg:deb/ubuntu/hivex?arch=source&distro=esm-apps%2Fxenial",
"ecosystem": "Ubuntu:Pro:16.04:LTS"
},
"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"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"
},
"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"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.3.15-1ubuntu0.1"
}
]
}
],
"package": {
"name": "hivex",
"purl": "pkg:deb/ubuntu/hivex?arch=source&distro=bionic",
"ecosystem": "Ubuntu:18.04:LTS"
},
"versions": [
"1.3.14-1build4",
"1.3.14-3build1",
"1.3.14-4",
"1.3.14-4build1",
"1.3.15-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libhivex-bin",
"binary_version": "1.3.15-1ubuntu0.1"
},
{
"binary_name": "libhivex-ocaml",
"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_version": "1.3.15-1ubuntu0.1"
},
{
"binary_name": "ruby-hivex",
"binary_version": "1.3.15-1ubuntu0.1"
}
],
"availability": "No subscription required"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.3.18-2ubuntu0.1"
}
]
}
],
"package": {
"name": "hivex",
"purl": "pkg:deb/ubuntu/hivex?arch=source&distro=focal",
"ecosystem": "Ubuntu:20.04:LTS"
},
"versions": [
"1.3.18-1",
"1.3.18-1build1",
"1.3.18-2",
"1.3.18-2build1",
"1.3.18-2build2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"
},
"ecosystem_specific": {
"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_name": "libwin-hivex-perl",
"binary_version": "1.3.18-2ubuntu0.1"
},
{
"binary_name": "python3-hivex",
"binary_version": "1.3.18-2ubuntu0.1"
},
{
"binary_name": "ruby-hivex",
"binary_version": "1.3.18-2ubuntu0.1"
}
],
"availability": "No subscription required"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "hivex",
"purl": "pkg:deb/ubuntu/hivex?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"1.3.19-1ubuntu3",
"1.3.21-1ubuntu1",
"1.3.21-1ubuntu4",
"1.3.21-1ubuntu5"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"
},
"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"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "hivex",
"purl": "pkg:deb/ubuntu/hivex?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"1.3.23-1build2",
"1.3.23-1build3",
"1.3.23-1build4",
"1.3.23-1build6",
"1.3.23-1build7"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libhivex-bin",
"binary_version": "1.3.23-1build7"
},
{
"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_name": "python3-hivex",
"binary_version": "1.3.23-1build7"
},
{
"binary_name": "ruby-hivex",
"binary_version": "1.3.23-1build7"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "hivex",
"purl": "pkg:deb/ubuntu/hivex?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"1.3.24-1build4",
"1.3.24-1build5",
"1.3.24-1build6"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libhivex-bin",
"binary_version": "1.3.24-1build6"
},
{
"binary_name": "libhivex-ocaml",
"binary_version": "1.3.24-1build6"
},
{
"binary_name": "libhivex0",
"binary_version": "1.3.24-1build6"
},
{
"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"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "hivex",
"purl": "pkg:deb/ubuntu/hivex?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"1.3.24-2.1build2",
"1.3.24-3build0.1",
"1.3.24-3build1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libhivex-bin",
"binary_version": "1.3.24-3build1"
},
{
"binary_name": "libhivex-ocaml",
"binary_version": "1.3.24-3build1"
},
{
"binary_name": "libhivex0",
"binary_version": "1.3.24-3build1"
},
{
"binary_name": "libwin-hivex-perl",
"binary_version": "1.3.24-3build1"
},
{
"binary_name": "python3-hivex",
"binary_version": "1.3.24-3build1"
},
{
"binary_name": "ruby-hivex",
"binary_version": "1.3.24-3build1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "hivex",
"purl": "pkg:deb/ubuntu/hivex?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"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"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-3504.json"
},
"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_name": "libhivex0",
"binary_version": "1.3.24-2.1build2"
},
{
"binary_name": "libwin-hivex-perl",
"binary_version": "1.3.24-2.1build2"
},
{
"binary_name": "python3-hivex",
"binary_version": "1.3.24-2.1build2"
},
{
"binary_name": "ruby-hivex",
"binary_version": "1.3.24-2.1build2"
}
]
}
}
],
"modified": "2026-10-17T12:56:00.749519728Z",
"provider": "osv",
"upstream": [
"CVE-2021-3504"
],
"references": [
"https://ubuntu.com/security/CVE-2021-3504",
"https://listman.redhat.com/archives/libguestfs/2021-May/msg00013.html",
"https://github.com/libguestfs/hivex/commit/8f1935733b10d974a1a4176d38dd151ed98cf381",
"https://ubuntu.com/security/notices/USN-5148-1",
"https://ubuntu.com/security/notices/USN-5148-2",
"https://www.cve.org/CVERecord?id=CVE-2021-3504"
]
},
"related_cves": [
{
"value": "CVE-2021-3504",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 354556,
"published_at": "2021-05-11T23:15:00+00:00"
}