Denial of Service Vulnerability in libexif: Out-of-Bounds Read via Crafted EXIF Tags

libexif Updated 02 Oct 2025

Summary

13/07/2012
N/A
Yes i
Unrated
Not published

ALPINE-CVE-2012-2813: The exif_convert_utf16_to_utf8 function in exif-entry.c in the EXIF Tag Parsing Library (aka libexif) before 0.6.21 allows remote attackers to cause a denial of service (out-of-bounds read) or possibly obtain sensitive i... Affects libexif versions < 0.6.21-r0. Fixed in 0.6.21-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libexif is an open-source library used for parsing EXIF (Exchangeable Image File Format) data from image files. It is commonly utilized in applications that handle image metadata, allowing developers to extract and manipulate information such as camera settings, date taken, and more. The library is designed to be efficient and lightweight, making it a popular choice for image processing tasks. However, prior to version 0.6.21, libexif was vulnerable to a specific issue that could be exploited by attackers to cause a denial of service or potentially leak sensitive information.

Vulnerability Detail

The vulnerability exists in the exif_convert_utf16_to_utf8 function located in exif-entry.c of libexif. This flaw allows remote attackers to craft malicious EXIF tags that, when processed, can lead to an out-of-bounds read. This can result in a denial of service, where the application may crash or become unresponsive, or it could allow attackers to access sensitive information stored in the process memory. The vulnerability was introduced in versions prior to 0.6.21 and has been identified as CVE-2012-2813.

How To Fix

Minimum fixed version

0.6.21-r0

This is the first release that contains the fix.

sudo apk add --upgrade libexif

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating the package is not immediately feasible, consider implementing input validation to sanitize EXIF tags before processing them. This can help mitigate the risk of exploitation until the library can be updated.

Conclusion

The vulnerability identified as CVE-2012-2813 in libexif poses significant risks, including denial of service and potential information leakage. It is crucial for users of the library to update to version 0.6.21 or later to mitigate these risks. Additionally, employing input validation can serve as a temporary workaround until the library is updated.

See every vulnerability recorded for libexif →

Share this vulnerability

FAQ

libexif is a library for reading and writing EXIF data in image files, commonly used in applications that handle image metadata.

CVE-2012-2813 refers to a specific vulnerability in libexif that allows for denial of service and potential information leakage through crafted EXIF tags.

You can use Vulert, which monitors open-source vulnerabilities in your software. By simply uploading your manifest file like package-lock.json, you can receive real-time alerts about vulnerabilities.

Failing to address this vulnerability may lead to application crashes, denial of service, and potential exposure of sensitive information to attackers.

Yes, implementing input validation to sanitize EXIF tags can help reduce the risk of exploitation until an update can be applied.

Related vulnerabilities

Recent vulnerabilities recorded for libexif.

How To Fix

Minimum fixed version

0.6.21-r0

This is the first release that contains the fix.

sudo apk add --upgrade libexif

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback