Sceawere
Vulnerability Detail
CVE-2026-82522UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
libjxl Integer Underflow Metadata Injection
Vulnerability Metadata
- Severity
- Medium
- Score / CVSS
- 5.4
- Creation Date
- 12h ago
- Vendor
- libjxl
- Product
- libjxl
- Attack Type
- Incorrect Conversion between Numeric Types
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- Attack Complexity
- LOW
Narrative and Response
Description
libjxl before 0.12 contains an integer underflow vulnerability in the container box parser that allows remote attackers to inject arbitrary metadata by exploiting 64-bit box size truncation to size_t on 32-bit platforms. Attackers can supply a crafted JPEG XL file causing the decoder to parse attacker-controlled codestream bytes as phantom box headers, enabling injection of arbitrary metadata (Exif, XMP, IPTC, JUMBF) and potential out-of-bounds reads.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "5.4",
"pubDate": "2026-09-02T18:21:27.587Z",
"pubdate": "2026-09-02T18:21:27.587Z",
"executiveSummary": "An integer underflow vulnerability exists in the libjxl container box parser prior to version 0.12. The flaw arises from unsafe truncation of 64-bit box sizes into size_t types on 32-bit platforms, leading to critical memory parsing errors.\nThis vulnerability allows remote attackers to perform arbitrary metadata injection, including Exif, XMP, IPTC, and JUMBF data, by providing a maliciously crafted JPEG XL image file.\nThe vulnerability poses significant security risks as it enables the manipulation of image metadata, which can be leveraged for downstream exploitation, such as cross-site scripting (XSS) if metadata is rendered in web contexts, or memory corruption via out-of-bounds reads.\nExploitation requires no authentication or specific user privileges, as it is triggered automatically when the application parses a malformed input file. The threat is most pronounced on 32-bit systems where the architectural limitation facilitates the truncation flaw. Attackers can bypass standard validation by crafting codestream bytes that the parser interprets as phantom box headers.",
"technicalDetails": "The core of the vulnerability resides in the container box parser component of libjxl. During the processing of JPEG XL files, the parser reads box size descriptors, which are defined as 64-bit values. On 32-bit architectures, the parser performs a type conversion where these 64-bit values are truncated into a platform-native size_t type. When a crafted large box size is supplied, the truncation results in an integer underflow or incorrect size calculation, leading the parser to misinterpret the file structure.\nThe attack flow initiates when a remote attacker delivers a specially crafted JPEG XL image. When the victim's application processes this file, the parser encounters the malicious box size. Due to the underflow, the internal state of the parser becomes desynchronized. The decoder proceeds to interpret subsequent arbitrary codestream bytes as legitimate box headers. These 'phantom' boxes allow the attacker to control the metadata injection flow.\nBy manipulating the phantom box headers, an attacker can trick the library into placing attacker-supplied data into sensitive metadata fields such as Exif, XMP, IPTC, or JUMBF. Because the parser's logic for metadata handling is compromised by the underflow, the process facilitates out-of-bounds read operations, as the parser may read memory beyond the intended buffers based on the corrupted size values.\nThis behavior allows for unauthorized modification of image headers, potentially leading to arbitrary code execution if the metadata is subsequently consumed by unsafe downstream sinks (e.g., image viewers or web browsers that fail to sanitize the metadata). The lack of input validation regarding the consistency between the 64-bit size field and the allocated memory buffers on 32-bit systems is the primary vector for this vulnerability. No authentication or elevated privileges are required to initiate the attack; simple interaction with the parser using the crafted payload is sufficient to induce the vulnerability.\nThe vulnerability is persistent across all versions of libjxl prior to 0.12. Successful exploitation necessitates that the host environment treats the truncated size as a valid input, allowing the attacker to control the parsing state machine's progression through the codestream, ultimately leading to data exfiltration or memory corruption."
}