CVEfocus › CVE database › CVE-2021-29457

CVE-2021-29457Heap buffer overflow in Exiv2::Jp2Image::doWriteMetadata

EPSS 2.2% (higher than 83% of CVEs)Published 2021-04-19Updated 2024-08-03Assigner: GitHub_M

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.

CWE-122

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

26Fixed
2Fix pending
7Will not fix
4Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 20.04exiv2Fixed0.27.2-8ubuntu2.2UBUNTU-CVE-2021-29457
Ubuntu 18.04exiv2Fixed0.25-3.1ubuntu0.18.04.7UBUNTU-CVE-2021-29457
Ubuntu 16.04exiv2Fix pending0.25-2.1ubuntu16.04.7+esm1 (Ubuntu Pro)UBUNTU-CVE-2021-29457
Ubuntu 14.04exiv2Fix pending
Debian 14exiv2Fixed0.27.3-3.1DEBIAN-CVE-2021-29457
Debian 13exiv2Fixed0.27.3-3.1DEBIAN-CVE-2021-29457
Debian 12exiv2Fixed0.27.3-3.1DEBIAN-CVE-2021-29457
Red Hat Enterprise Linux 9exiv2Not affected
Red Hat Enterprise Linux 9exiv2-develNot affected
Red Hat Enterprise Linux 9exiv2-docNot affected
Red Hat Enterprise Linux 9exiv2-libsNot affected
Red Hat Enterprise Linux 8exiv2Fixed0:0.27.4-5.el8RHSA-2021:4173
Red Hat Enterprise Linux 8exiv2-develFixed0:0.27.4-5.el8RHSA-2021:4173
Red Hat Enterprise Linux 8exiv2-docFixed0:0.27.4-5.el8RHSA-2021:4173
Red Hat Enterprise Linux 8exiv2-libsFixed0:0.27.4-5.el8RHSA-2021:4173
Red Hat Enterprise Linux 7exiv2Will not fix
Out of support scope
Red Hat Enterprise Linux 7exiv2-develWill not fix
Out of support scope
Red Hat Enterprise Linux 7exiv2-docWill not fix
Out of support scope
Red Hat Enterprise Linux 7exiv2-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 6exiv2Will not fix
Out of support scope
Red Hat Enterprise Linux 6exiv2-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6exiv2-libsWill not fix
Out of support scope
AlmaLinux 8exiv2Fixed0.27.4-5.el8ALSA-2021:4173
AlmaLinux 8exiv2-develFixed0.27.4-5.el8ALSA-2021:4173
AlmaLinux 8exiv2-docFixed0.27.4-5.el8ALSA-2021:4173
AlmaLinux 8exiv2-libsFixed0.27.4-5.el8ALSA-2021:4173
Rocky Linux 8exiv2Fixed0:0.27.4-5.el8RLSA-2021:4173
Alpine Linux 3.24exiv2Fixed0.27.3-r1ALPINE-CVE-2021-29457
Alpine Linux 3.23exiv2Fixed0.27.3-r1ALPINE-CVE-2021-29457
Alpine Linux 3.22exiv2Fixed0.27.3-r1ALPINE-CVE-2021-29457
Alpine Linux 3.21exiv2Fixed0.27.3-r1ALPINE-CVE-2021-29457
Alpine Linux 3.20exiv2Fixed0.27.3-r1ALPINE-CVE-2021-29457
Alpine Linux 3.19exiv2Fixed0.27.3-r1ALPINE-CVE-2021-29457
Alpine Linux 3.18exiv2Fixed0.27.3-r1ALPINE-CVE-2021-29457
Alpine Linux 3.17exiv2Fixed0.27.3-r1ALPINE-CVE-2021-29457
Alpine Linux 3.16exiv2Fixed0.27.3-r1ALPINE-CVE-2021-29457
Alpine Linux 3.15exiv2Fixed0.27.3-r1ALPINE-CVE-2021-29457
Alpine Linux 3.14exiv2Fixed0.27.3-r1ALPINE-CVE-2021-29457
Alpine Linux 3.13exiv2Fixed0.27.3-r1ALPINE-CVE-2021-29457

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.