{"id":"CVE-2025-54874","summary":"OpenJPEG allows OOB heap memory write in opj_jp2_read_header","details":"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.","modified":"2026-04-12T17:14:04.990219Z","published":"2025-08-05T14:33:17.323Z","related":["ALSA-2025:13944","CGA-fg9q-j77f-g2w8","openSUSE-SU-2025:15421-1"],"database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-457"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/54xxx/CVE-2025-54874.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/54xxx/CVE-2025-54874.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-54874"},{"type":"ADVISORY","url":"https://securitylab.github.com/advisories/GHSL-2025-057_OpenCV"},{"type":"FIX","url":"https://github.com/uclouvain/openjpeg/commit/f809b80c67717c152a5ad30bf06774f00da4fd2d"},{"type":"FIX","url":"https://github.com/uclouvain/openjpeg/pull/1573"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/uclouvain/openjpeg","events":[{"introduced":"14d03e8ed5dcdb8552c8a4c7c9a383b29a6891cb"},{"fixed":"f809b80c67717c152a5ad30bf06774f00da4fd2d"}]}],"versions":["v2.5.1","v2.5.2","v2.5.3"],"database_specific":{"vanir_signatures":[{"signature_version":"v1","digest":{"threshold":0.9,"line_hashes":["272056726866992156509900551740469083344","238217240773972104591176391809576663911","256099976055268152159627519408704047425","208345000864026141751896735822997387696"]},"deprecated":false,"target":{"file":"src/lib/openjp2/jp2.c"},"source":"https://github.com/uclouvain/openjpeg/commit/f809b80c67717c152a5ad30bf06774f00da4fd2d","signature_type":"Line","id":"CVE-2025-54874-caed9d70"},{"signature_version":"v1","digest":{"length":1528,"function_hash":"282837610718858633442933438411884669742"},"deprecated":false,"target":{"file":"src/lib/openjp2/jp2.c","function":"opj_jp2_read_header"},"source":"https://github.com/uclouvain/openjpeg/commit/f809b80c67717c152a5ad30bf06774f00da4fd2d","signature_type":"Function","id":"CVE-2025-54874-e27ad67e"}],"vanir_signatures_modified":"2026-04-12T17:14:04Z","source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-54874.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"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"}]}