Denial of Service Vulnerability in libmetadata-extractor-java

libmetadata-extractor-java Updated 02 Oct 2025

Summary

24/02/2022
N/A
No i
Medium
5.5

CVE-2022-24613: metadata-extractor up to 2.16.0 can throw various uncaught exceptions while parsing a specially crafted JPEG file, which could result in an application crash. Affects libmetadata-extractor-java versions < 61edef50d22bfc6d4f76a2c76d16bdaf171d9e3e. No fix is published. 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

libmetadata-extractor-java is a Java library used for extracting metadata from various file formats, including JPEG files. It provides functionality to parse and extract metadata information such as camera details, GPS coordinates, and image properties. However, a vulnerability has been discovered in versions up to 2.16.0 of the library, which can lead to a denial of service (DoS) attack. This vulnerability allows an attacker to crash applications that use the metadata-extractor library by exploiting uncaught exceptions while parsing specially crafted JPEG files.

Vulnerability Detail

The vulnerability, identified as CVE-2022-24613, originates from the metadata-extractor library's failure to handle certain exceptions during the parsing of JPEG files. An attacker can create a malicious JPEG file with carefully crafted metadata that triggers these uncaught exceptions. When an application using the library attempts to parse this file, it can crash due to the unhandled exceptions. This vulnerability can be exploited to launch a DoS attack against services relying on the metadata-extractor library, rendering them unavailable.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a workaround, if updating the library is not immediately feasible, it is recommended to implement input validation for JPEG files before parsing them with the metadata-extractor library. By validating the file's structure and metadata, potential malicious files triggering the vulnerability can be detected and rejected. Here is an example of how to perform input validation in Java:

import com.drew.imaging.ImageMetadataReader;
import com.drew.metadata.Metadata;
import java.io.File;

public class JPEGValidation {
  public static void main(String[] args) {
    File inputFile = new File("path/to/jpeg/file.jpg");
    try {
      Metadata metadata = ImageMetadataReader.readMetadata(inputFile);
      // Perform further processing
    } catch (Exception e) {
      System.out.println("Invalid JPEG file: " + e.getMessage());
    }
  }
}

Conclusion

The vulnerability in libmetadata-extractor-java versions up to 2.16.0 can lead to a denial of service (DoS) attack by exploiting uncaught exceptions during the parsing of specially crafted JPEG files. To mitigate this vulnerability, it is recommended to update the libmetadata-extractor-java package to a version that includes the fix. Alternatively, implementing input validation for JPEG files can serve as a temporary workaround. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for libmetadata-extractor-java →

Share this vulnerability

FAQ

libmetadata-extractor-java is a Java library used for extracting metadata from various file formats, including JPEG files. It provides functionality to parse and extract metadata information such as camera details, GPS coordinates, and image properties.

The vulnerability in libmetadata-extractor-java can be exploited to launch a denial of service (DoS) attack. By sending a specially crafted JPEG file to an application using the library, an attacker can cause the application to crash, rendering it unavailable.

To fix this vulnerability, it is recommended to update the libmetadata-extractor-java package to a version that includes the fix. The vulnerability has been addressed in commit 61edef50d22bfc6d4f76a2c76d16bdaf171d9e3e in the GitHub repository of the metadata-extractor library.

Yes, if updating the library is not immediately feasible, you can implement input validation for JPEG files before parsing them with the metadata-extractor library. By validating the file's structure and metadata, potential malicious files triggering the vulnerability can be detected and rejected.

You can find more information about this vulnerability, including technical details and the fix, in the CVE-2022-24613 JSON report available at https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-24613.json.

Related vulnerabilities

Recent vulnerabilities recorded for libmetadata-extractor-java.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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