---
id: CVE-2024-56827
title: 'Openjpeg: heap buffer overflow in lib/openjp2/j2k.c'
summary: >-
  A flaw was found in the OpenJPEG project. A heap buffer overflow condition may
  be triggered when certain options are specified while using the opj_decompress
  utility.  This can lead to an application crash or other undefined behavior.
severity: medium
cvss: 5.6
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:H'
cvssSource: cna
cwe:
  - CWE-122
vendor: Red Hat
product: openjpeg
affected:
  - openjpeg
  - openjpeg2 (all versions)
  - openjpeg2
  - openjpeg
  - openjpeg
  - openjpeg2
  - 'gimp:flatpak/openjpeg2'
  - openjpeg2
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2025-01-09T15:38:58.334350Z'
published: '2025-01-09'
updated: '2026-11-05'
sourceUpdated: '2026-11-05T13:24:00.200Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2024-56827'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2025:7309'
    label: 'RHSA-2025:7309'
  - url: 'https://access.redhat.com/security/cve/CVE-2024-56827'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2335174'
    label: RHBZ#2335174
  - url: >-
      https://github.com/uclouvain/openjpeg/commit/e492644fbded4c820ca55b5e50e598d346e850e8
  - url: 'https://github.com/uclouvain/openjpeg/issues/1564'
tags:
  - cve.org
epss: 0.0026
epssPercentile: 0.17813
ingestedAt: '2026-11-05T21:36:00.841Z'
---

## Overview

A flaw was found in the OpenJPEG project. A heap buffer overflow condition may be triggered when certain options are specified while using the opj_decompress utility.  This can lead to an application crash or other undefined behavior.

## Affected

- `openjpeg`
- `openjpeg2 (all versions)`
- `openjpeg2`
- `openjpeg`
- `openjpeg`
- `openjpeg2`
- `gimp:flatpak/openjpeg2`
- `openjpeg2`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
