OpenCV Vulnerability CVE-2025-53644: Uninitialized Pointer Leading to Arbitrary Heap Buffer Write

opencv Updated 02 Oct 2025

Summary

17/07/2025
N/A
Yes i
Unrated
Not published

CVE-2025-53644: OpenCV is an Open Source Computer Vision Library. Affects opencv across 3 version ranges.

< 3.2.0+dfsg-1 < 49486f61fb25722cbcf586b7f4320921d46fb38e < a39db41390de546d18962ee1278bd6dbb715f466

Fixed in 3.2.0+dfsg-1. 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

OpenCV is an Open Source Computer Vision Library widely used for image processing and computer vision tasks. It provides a comprehensive set of tools for real-time image processing, machine learning, and computer vision applications. The library is known for its efficiency and versatility, making it a popular choice among developers. However, versions prior to 4.12.0 are susceptible to a critical vulnerability that can lead to severe security issues when handling crafted JPEG images.

Vulnerability Detail

The vulnerability identified as CVE-2025-53644 arises from an uninitialized pointer variable on the stack within OpenCV. This flaw can be exploited when the library processes specially crafted JPEG images, potentially allowing an attacker to perform arbitrary heap buffer writes. Such exploitation can lead to various malicious outcomes, including data corruption, application crashes, or even arbitrary code execution, posing a significant risk to systems utilizing affected versions of OpenCV.

How To Fix

Minimum fixed version

3.2.0+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade opencv

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

Workaround

As a temporary measure, users can avoid processing untrusted or crafted JPEG images until the library is updated. Additionally, implementing input validation to check image integrity before processing may help mitigate potential risks.

Conclusion

CVE-2025-53644 represents a serious vulnerability in OpenCV that can lead to arbitrary heap buffer writes when processing crafted JPEG images. Users are strongly advised to update to version 4.12.0 or later to mitigate this risk. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for opencv →

Share this vulnerability

FAQ

CVE-2025-53644 is a vulnerability in OpenCV that involves an uninitialized pointer leading to arbitrary heap buffer writes when processing crafted JPEG images.

Versions of OpenCV prior to 4.12.0 are affected by this vulnerability.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

Exploitation of this vulnerability can lead to data corruption, application crashes, or arbitrary code execution, posing significant security risks.

You can update OpenCV to the patched version by running 'sudo apt-get install opencv=4.12.0' in your terminal for Debian-based systems.

Related vulnerabilities

Recent vulnerabilities recorded for opencv.

How To Fix

Minimum fixed version

3.2.0+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade opencv

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