# CVE-2025-53644: OpenCV contains a use after free buffer write due to an uninitialized pointer

> An attacker can achieve arbitrary heap buffer write and potential code execution by tricking a user into opening a crafted JPEG image with OpenCV.

- **Severity:** Medium 6.6 (`CVSS:4.0/AV:L/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Jul 2025
- **Updated:** 26 Sep 2025
- **Also known as:** DEBIAN-CVE-2025-53644, JLSEC-2026-569

## What is CVE-2025-53644?

CVE-2025-53644 is a medium-severity use after free vulnerability in opencv, published on 17 Jul 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

OpenCV is an Open Source Computer Vision Library. Versions 4.10.0 and 4.11.0 have an uninitialized pointer variable on stack that may lead to arbitrary heap buffer write when reading crafted JPEG images. Version 4.12.0 fixes the vulnerability.

Weakness: CWE-457 (Use of Uninitialized Variable)

## Which versions are affected by CVE-2025-53644?

It affects 1 product.


Products: Opencv Opencv.

## How do I fix CVE-2025-53644?

Upgrade to a fixed version.

## Is CVE-2025-53644 being exploited?

There is no known exploitation of CVE-2025-53644 in the wild and no public exploit code.

## Other vulnerabilities in opencv

- [CVE-2019-5063](https://insights.sbomify.com/CVE-2019-5063/): Out-of-bounds Write in OpenCV (high 8.8)
- [CVE-2019-5064](https://insights.sbomify.com/CVE-2019-5064/): Out-of-bounds Write in OpenCV (high 8.8)
- [CVE-2019-14491](https://insights.sbomify.com/CVE-2019-14491/): Out-of-bounds Read in OpenCV (high 8.2)
- [CVE-2019-14492](https://insights.sbomify.com/CVE-2019-14492/): Out-of-bounds Read and Out-of-bounds Write in OpenCV (high 7.5)
- [CVE-2018-7712](https://insights.sbomify.com/CVE-2018-7712/): Denial of service in n/a (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-53644 and fix it if it is affected.

What it is: CVE-2025-53644 is a medium-severity use after free vulnerability in opencv, published on 17 Jul 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-53644 in the wild and no public exploit code.

Affected product: opencv. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-53644/ (Markdown: https://insights.sbomify.com/CVE-2025-53644/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-53644
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-53644
- OSV: https://osv.dev/vulnerability/CVE-2025-53644

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-53644/
Summaries are generated and may contain mistakes; the official description above is the record.
