CVE-2025-54080: Exiv2 Segmentation Faults in Exiv2 :EpsImage::writeMetadata() Vulnerability

LOW
Advisory Identifier: GHSA-496f-x7cq-cq39
CWE-125
Published
Advisory Summary

CVE-2025-54080 is a LOW :epsimage::writemetadata() vulnerability (CWE-125: Out-of-bounds Read) affecting Exiv2 Segmentation Faults in Exiv2 libraries in the PyPI ecosystem. The issue involves :epsimage::writemetadata() via crafted eps file. Remediation is available in the latest vendor maintenance releases.

CVE-2025-54080 at a Glance

CVE Identifier CVE-2025-54080
GHSA Identifier GHSA-496f-x7cq-cq39
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-125: Out-of-bounds Read
Affected Product Exiv2 Segmentation Faults in Exiv2
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-54080

To remediate this vulnerability, upgrade all affected Exiv2 Segmentation Faults in Exiv2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Exiv2 fixed: Latest secure release
pip install Exiv2>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show Exiv2

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-54080, inspect your installed packages using pip:

pip show Exiv2

Analyze the terminal output to locate any version of Exiv2 Segmentation Faults in Exiv2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show Exiv2 command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Exiv2 Segmentation Faults in Exiv2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact An out-of-bounds read was found in Exiv2 versions v0.28.5 and earlier. Exiv2 is a command-line utility and C++ library for reading, writing, deleting, and modifying the metadata of image files. The out-of-bounds read is triggered when Exiv2 is used to write metadata into a crafted image file. An attacker could potentially exploit the vulnerability to cause a denial of service by crashing Exiv2, 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 delete. ### Patches The bug is fixed in version v0.28.6. ### Credit Thank you to @dragonArthurX for reporting this issue. ### Details (from original report by @dragonArthurX ) **Version:** Tested on v0.28.5 (latest official release) Commit: 907169fa643c2c74c14fd4106e55eaeee3634d9f **Platform:** Ubuntu 20.04.6 LTS (x86_64) **Build Steps:** ```bash git clone https://github.com/Exiv2/exiv2.git cd exiv2 git checkout v0.28.5 mkdir build-v0.28.5 && cd build-v0.28.5 cmake -DCMAKE_C_COMPILER=/fuzzer/afl-clang-fast -DCMAKE_CXX_COMPILER=/fuzzer/afl-clang-fast++ -DCMAKE_C_FLAGS="-g -fsanitize=address" -DCMAKE_CXX_FLAGS="-g -fsanitize=address" -DBUILD_SHARED_LIBS=OFF ../ ``` **Command line to reproduce:** ```bash /home/exiv2/build/bin/exiv2 -d a -f /home/poc ``` **Crash Output:** ``` AddressSanitizer:DEADLYSIGNAL ================================================================ = ==376531==ERROR: AddressSanitizer: SEGV on unknown address 0x7fd92236b0e7 (pc 0x7fd82314dcd2 bp 0x7ffd540ceba0 sp 0x7ffd540ce358 T0) ==376531==The signal is caused by a READ memory access. #0 0x7fd82314dcd2 /build/glibc-B3wQXB/glibc-2.31/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:383 #1 0x4ed131 in __asan_memcpy (/home/exiv2/build-v0.28.5/bin/exiv2+0x4ed131) #2 0x6184b1 in Exiv2::MemIo::write(unsigned char const*, unsigned long) /home/exiv2/src/basicio.cpp:704:5 #3 0xad336d in (anonymous namespace)::writeTemp(Exiv2::BasicIo&, unsigned char const*, unsigned long) /home/exiv2/src/epsimage.cpp:90:14 #4 0xac3a07 in (anonymous namespace)::readWriteEpsMetadata(Exiv2::BasicIo&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::vector<Exiv2::NativePreview, std::allocator<Exiv2::NativePreview> >&, bool) /home/exiv2/src/epsimage.cpp:1009:7 #5 0xad1175 in Exiv2::EpsImage::writeMetadata() /home/exiv2/src/epsimage.cpp:1103:3 #6 0x5d2383 in Action::Erase::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/exiv2/app/actions.cpp:713:14 #7 0x522d02 in main /home/exiv2/app/exiv2.cpp:177:25 #8 0x7fd8230b6082 in __libc_start_main /build/glibc-B3wQXB/glibc-2.31/csu/../csu/libc-start.c:308:16 #9 0x4714dd in _start (/home/exiv2/build-v0.28.5/bin/exiv2+0x4714dd) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /build/glibc-B3wQXB/glibc-2.31/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:383 ==376531==ABORTING ```

CVE-2025-54080 Affected Exiv2 Segmentation Faults in Exiv2 Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
Exiv2
PyPI
≤ 0.17.3

References

Frequently Asked Questions

What is CVE-2025-54080?
CVE-2025-54080 is a security vulnerability in Exiv2 Segmentation Faults in Exiv2 involving :EpsImage::writeMetadata() via crafted EPS file under CWE-125: Out-of-bounds Read.
Which Exiv2 Segmentation Faults in Exiv2 versions are affected?
Affected versions include releases prior to current release patches across affected packages: Exiv2.
What version fixes CVE-2025-54080?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is Exiv2 affected?
Yes, Exiv2 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2025-54080?
CVE-2025-54080 is classified under CWE-125: Out-of-bounds Read (The product reads data past the end, or before the beginning, of the intended buffer.).
How can I check PyPI dependencies for CVE-2025-54080?
Run the dependency tree command: 'pip show Exiv2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-496f-x7cq-cq39",
  "modified" : "2025-08-29T21:03:53Z",
  "published" : "2025-08-29T14:49:41Z",
  "aliases" : [ "CVE-2025-54080" ],
  "summary" : "Exiv2 Segmentation Faults in Exiv2::EpsImage::writeMetadata() via crafted EPS file",
  "details" : "### Impact\nAn out-of-bounds read was found in Exiv2 versions v0.28.5 and earlier. Exiv2 is a command-line utility and C++ library for reading, writing, deleting, and modifying the metadata of image files. The out-of-bounds read is triggered when Exiv2 is used to write metadata into a crafted image file. An attacker could potentially exploit the vulnerability to cause a denial of service by crashing Exiv2, if they can trick the victim into running Exiv2 on a crafted image file.\n\nNote 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 delete.\n\n### Patches\nThe bug is fixed in version v0.28.6.\n\n### Credit\nThank you to @dragonArthurX for reporting this issue.\n\n### Details (from original report by @dragonArthurX )\n**Version:**\nTested on v0.28.5 (latest official release)\nCommit: 907169fa643c2c74c14fd4106e55eaeee3634d9f\n\n**Platform:**\nUbuntu 20.04.6 LTS (x86_64)\n\n**Build Steps:**\n```bash\ngit clone https://github.com/Exiv2/exiv2.git\ncd exiv2\ngit checkout v0.28.5\nmkdir build-v0.28.5 && cd build-v0.28.5\ncmake -DCMAKE_C_COMPILER=/fuzzer/afl-clang-fast -DCMAKE_CXX_COMPILER=/fuzzer/afl-clang-fast++ -DCMAKE_C_FLAGS=\"-g -fsanitize=address\" -DCMAKE_CXX_FLAGS=\"-g -fsanitize=address\" -DBUILD_SHARED_LIBS=OFF ../\n```\n\n**Command line to reproduce:**\n```bash\n/home/exiv2/build/bin/exiv2 -d a -f /home/poc \n```\n\n**Crash Output:** \n```\nAddressSanitizer:DEADLYSIGNAL\n ================================================================ = \n==376531==ERROR: AddressSanitizer: SEGV on unknown address 0x7fd92236b0e7 (pc 0x7fd82314dcd2 bp 0x7ffd540ceba0 sp 0x7ffd540ce358 T0)\n==376531==The signal is caused by a READ memory access.\n    #0 0x7fd82314dcd2  /build/glibc-B3wQXB/glibc-2.31/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:383\n    #1 0x4ed131 in __asan_memcpy (/home/exiv2/build-v0.28.5/bin/exiv2+0x4ed131)\n    #2 0x6184b1 in Exiv2::MemIo::write(unsigned char const*, unsigned long) /home/exiv2/src/basicio.cpp:704:5\n    #3 0xad336d in (anonymous namespace)::writeTemp(Exiv2::BasicIo&, unsigned char const*, unsigned long) /home/exiv2/src/epsimage.cpp:90:14\n    #4 0xac3a07 in (anonymous namespace)::readWriteEpsMetadata(Exiv2::BasicIo&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::vector<Exiv2::NativePreview, std::allocator<Exiv2::NativePreview> >&, bool) /home/exiv2/src/epsimage.cpp:1009:7\n    #5 0xad1175 in Exiv2::EpsImage::writeMetadata() /home/exiv2/src/epsimage.cpp:1103:3\n    #6 0x5d2383 in Action::Erase::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/exiv2/app/actions.cpp:713:14\n    #7 0x522d02 in main /home/exiv2/app/exiv2.cpp:177:25\n    #8 0x7fd8230b6082 in __libc_start_main /build/glibc-B3wQXB/glibc-2.31/csu/../csu/libc-start.c:308:16\n    #9 0x4714dd in _start (/home/exiv2/build-v0.28.5/bin/exiv2+0x4714dd)\n\nAddressSanitizer can not provide additional info.\nSUMMARY: AddressSanitizer: SEGV /build/glibc-B3wQXB/glibc-2.31/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:383 \n==376531==ABORTING\n```",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Exiv2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.17.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Exiv2/exiv2/security/advisories/GHSA-496f-x7cq-cq39"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54080"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Exiv2/exiv2/commit/e737332427711f15bcdc4e903203d6b7493eaec0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Exiv2/exiv2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-125" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-29T14:49:41Z",
    "nvd_published_at" : "2025-08-29T15:15:35Z"
  }
}