CVE-2021-29464
Heap buffer overflow in Exiv2::Jp2Image::encodeJp2Header
Reported by github_m · Published April 30, 2021
Exiv2 is a command-line utility and C++ library for reading, writing, deleting, and modifying the metadata of image files. A heap buffer overflow was found in Exiv2 versions v0.27.3 and earlier. The heap overflow is triggered when Exiv2 is used to write metadata into a crafted image file. An attacker could potentially exploit the vulnerability to gain code execution, if they can trick the victim into running Exiv2 on a crafted image file. Note that this bug is only triggered when writing the metadata, which is a less frequently used Exiv2 operation than reading the metadata. For example, to trigger the bug in the Exiv2 command-line application, you need to add an extra command-line argument such as `insert`. The bug is fixed in version v0.27.4.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| exiv2 | Arch Linux | 0.27.4-1 |
| exiv2 | Alpine | 0.27.4-r0 |
| exiv2-doc | Amazon Linux | 0.27.0-4.amzn2.0.2 |
| exiv2 | Amazon Linux | 0.27.0-4.amzn2.0.2 |
| exiv2-libs | Amazon Linux | 0.27.0-4.amzn2.0.2 |
| exiv2 | exiv2 | 0.27.4 |
| exiv2 | Ubuntu:20.04:LTS | 0.27.2-8ubuntu2.4 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Exiv2 | exiv2 | < 0.27.4 |
| arch | exiv2 | 0 |
| alpine | exiv2 | 0 |
| amazon:2 | exiv2-doc | 0 |
| amazon:2 | exiv2 | 0 |
| amazon:2 | exiv2-libs | 0 |
| Exiv2 | exiv2 | 0 |
| amazon:2 | exiv2-devel | 0 |
Timeline
- Apr 30, 2021 CVE Published
- May 1, 2021 EPSS Score (30 in total, the first dated here)
- Aug 3, 2024 CVE Updated
- Mar 7, 2026 Distribution Patch (3 in total, the first dated here)
- Mar 7, 2026 Security Advisory (4 in total, the first dated here)
- Aug 5, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-29464
vulnetix vdb fixes CVE-2021-29464
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-29464/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- FEDORA-2021-0b27f220bd vendor-advisory
- FEDORA-2021-dde4d7d47e vendor-advisory
- GLSA-202312-06 vendor-advisory