CVE-2021-29457: Heap buffer overflow in Exiv2::Jp2Image::doWriteMetadata
Noroxi assessment
Priority: Monitor (action score 32/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 2.1% (FIRST EPSS); higher than 82.4% of all records.
- Someone with local access to the system can trigger it. No account or password is required. A user must open a link or visit a page. No special conditions are required; it is repeatable.
- Fixed version: exiv2 (AlmaLinux:8) 0.27.4-5.el8; exiv2-devel (AlmaLinux:8) 0.27.4-5.el8; exiv2-doc (AlmaLinux:8) 0.27.4-5.el8.
Low priority for now. Upgrade to exiv2 (AlmaLinux:8) 0.27.4-5.el8; exiv2-devel (AlmaLinux:8) 0.27.4-5.el8; exiv2-doc (AlmaLinux:8) 0.27.4-5.el8 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Apr 19, 2021
- Updated
- Jun 16, 2026
- EPSS
- 2.1% · 82th percentile
- CWE
- CWE-122
Report tools
Action score
32
Low priority for now.
- CVSS
- 31 / 40 · 7.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 2.1%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| exiv2 | exiv2 | cpe:2.3:a:exiv2:exiv2 |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
Exiv2 exiv2
- < 0.27.4affected
Affected versions · NVD (5)
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux10.0
- debian debian linux9.0
- exiv2 exiv2before 0.27.4
- fedoraproject fedora33
- fedoraproject fedora34
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | exiv2 | before 0.27.4-5.el8 | 0.27.4-5.el8 |
| AlmaLinux:8 | exiv2-devel | before 0.27.4-5.el8 | 0.27.4-5.el8 |
| AlmaLinux:8 | exiv2-doc | before 0.27.4-5.el8 | 0.27.4-5.el8 |
| AlmaLinux:8 | exiv2-libs | before 0.27.4-5.el8 | 0.27.4-5.el8 |
| Alpine:v3.13 | exiv2 | before 0.27.3-r1 | 0.27.3-r1 |
| Debian:10 | exiv2 | before 0.25-4+deb10u2 | 0.25-4+deb10u2 |
| Debian:12 | exiv2 | before 0.27.3-3.1 | 0.27.3-3.1 |
| Debian:9 | exiv2 | before 0.25-3.1+deb9u3 | 0.25-3.1+deb9u3 |
| openSUSE:Leap 15.4 | exiv2 | before 0.27.5-150400.15.4.1 | 0.27.5-150400.15.4.1 |
| openSUSE:Leap 15.4 | exiv2-0_26 | before 0.26-150400.9.16.1 | 0.26-150400.9.16.1 |
| openSUSE:Tumbleweed | exiv2 | before 0.27.5-3.1 | 0.27.5-3.1 |
| Red Hat:enterprise_linux:8::appstream | exiv2 | before 0:0.27.4-5.el8 | 0:0.27.4-5.el8 |
| Red Hat:enterprise_linux:8::appstream | exiv2-debuginfo | before 0:0.27.4-5.el8 | 0:0.27.4-5.el8 |
| Red Hat:enterprise_linux:8::appstream | exiv2-debugsource | before 0:0.27.4-5.el8 | 0:0.27.4-5.el8 |
| Red Hat:enterprise_linux:8::appstream | exiv2-libs | before 0:0.27.4-5.el8 | 0:0.27.4-5.el8 |
| Red Hat:enterprise_linux:8::appstream | exiv2-libs-debuginfo | before 0:0.27.4-5.el8 | 0:0.27.4-5.el8 |
| Red Hat:enterprise_linux:8::crb | exiv2-devel | before 0:0.27.4-5.el8 | 0:0.27.4-5.el8 |
| Red Hat:enterprise_linux:8::crb | exiv2-doc | before 0:0.27.4-5.el8 | 0:0.27.4-5.el8 |
| Rocky Linux:8 | exiv2 | before 0:0.27.4-5.el8 | 0:0.27.4-5.el8 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | exiv2 | before 0.27.5-150400.15.4.1 | 0.27.5-150400.15.4.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | exiv2-0_26 | before 0.26-150400.9.16.1 | 0.26-150400.9.16.1 |
| SUSE:OpenStack Cloud 9 | exiv2 | before 0.23-12.18.1 | 0.23-12.18.1 |
Same product
exiv2: all recordsOther highest-scoring records for the same primary product.
- CVE-2018-11531Exiv2 0.26 has a heap-based buffer overflow in getData in preview.cpp.40Plan
- CVE-2019-9144An issue was discovered in Exiv2 0.27.36Monitor
- CVE-2019-9143An issue was discovered in Exiv2 0.27.36Monitor
Published before and after this one in the same product
- ← EarlierCVE-2019-20421Jan 27, 2020 · In Jp2Image::readMetadata() in jp2image.cpp in Exiv2 0.27.2, an input file can result in an infinite loop and hang, with high CPU…31Monitor
- ← EarlierCVE-2021-3482Apr 8, 2021 · A flaw was found in Exiv2 in versions before and including 0.27.4-RC1.27Monitor
- Later →CVE-2021-29458Apr 19, 2021 · Out-of-bounds read in Exiv2::Internal::CrwMap::encode22Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| almalinux:exiv2 | 0.27.4-5.el8 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:exiv2-devel | 0.27.4-5.el8 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:exiv2-doc | 0.27.4-5.el8 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:exiv2-libs | 0.27.4-5.el8 · AlmaLinux:8 | Package registry (OSV) |
| alpine:exiv2 | 0.27.3-r1 · Alpine:v3.13 | Package registry (OSV) |
| debian:exiv2 | 0.27.3-3.1 · Debian:12 | Package registry (OSV) |
| opensuse:exiv2 | 0.27.5-150400.15.4.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:exiv2-0_26 | 0.26-150400.9.16.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| red hat:exiv2 | 0:0.27.4-5.el8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:exiv2-debuginfo | 0:0.27.4-5.el8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:exiv2-debugsource | 0:0.27.4-5.el8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:exiv2-devel | 0:0.27.4-5.el8 · Red Hat:enterprise_linux:8::crb | Package registry (OSV) |
| red hat:exiv2-doc | 0:0.27.4-5.el8 · Red Hat:enterprise_linux:8::crb | Package registry (OSV) |
| red hat:exiv2-libs | 0:0.27.4-5.el8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:exiv2-libs-debuginfo | 0:0.27.4-5.el8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| rocky linux:exiv2 | 0:0.27.4-5.el8 · Rocky Linux:8 | Package registry (OSV) |
| suse:exiv2 | 0.27.5-150400.15.4.1 · SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | Package registry (OSV) |
| suse:exiv2-0_26 | 0.26-150400.9.16.1 · SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Not on record for this CVE: EPSS history · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- No account or password is required.
- A user must open a link or visit a page.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-122 · Heap-based Buffer OverflowCVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
—
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (6 more)Show less
- github.com/Exiv2/exiv2/security/advisories/GHSA-v74w-h496-cgqm
- lists.debian.org/debian-lts-announce/2021/08/msg00028.html
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2XQT5F5IINTDYDAFGVGQZ7PMMLG7I5ZZ/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/P2A5GMJEXQ5Q76JK6F6VKK5JYCLVFGKN/
- security.gentoo.org/glsa/202312-06
- www.debian.org/security/2021/dsa-4958
Vendor advisories and official records. Exploit/PoC links are deliberately left out.