CVE-2026-52834
Rust vulnerability analysis and mitigation

Overview

CVE-2026-52834 is a heap-based buffer overflow vulnerability in the jxl-grid crate (part of the jxl-oxide JPEG XL decoder written in Rust) that affects 32-bit platforms. When decoding a crafted JPEG XL image, an integer overflow in the width * height length calculation within AlignedGrid::with_alloc_tracker causes allocation of an undersized backing buffer, leading to out-of-bounds writes. All versions of jxl-grid up to and including 0.6.1 are affected; version 0.6.2 contains the fix. The vulnerability was first published by the maintainer on May 29, 2026, and added to the GitHub Advisory Database on July 2, 2026. It carries a CVSS v3.1 base score of 7.3 (High) (GitHub Advisory, jxl-oxide Advisory).

Technical details

The root cause is an unchecked integer multiplication (width * height) in AlignedGrid::with_alloc_tracker (CWE-190: Integer Overflow or Wraparound; CWE-131: Incorrect Calculation of Buffer Size; CWE-122: Heap-based Buffer Overflow). On 32-bit targets, usize is 32 bits wide, so large dimension products wrap around to a small value, causing the heap allocator to provision a tiny buffer for a logically huge grid. Subsequent writes through mutable subgrid references then access memory beyond the allocated region. Two exploitation paths exist: (1) a frame with dimensions such as 65536×65536 that passes the existing area limit check (2^32 ≤ 2^40) but overflows usize element count, triggering too-small allocations in modular/VarDCT/filter rendering paths; and (2) a small cropped frame paired with a huge canvas/ROI, where composition in crates/jxl-render/src/blend.rs allocates an output grid sized to the canvas, overflowing on 32-bit during render_frame(). A PoC test case and instructions for reproducing the issue under Miri and AddressSanitizer are publicly available in the advisory (GitHub Advisory, jxl-oxide Advisory).

Impact

Successful exploitation on a 32-bit platform allows an attacker to perform out-of-bounds heap writes with attacker-controlled data, which the advisory states could lead to arbitrary code execution. The scope is marked as Changed, meaning the impact can extend beyond the vulnerable decoder component itself. Confidentiality and integrity impacts are rated Low, while availability impact is rated High, reflecting the potential for crashes or memory corruption that could destabilize the host process or broader system (GitHub Advisory, jxl-oxide Advisory).

Exploitability

A PoC test case is publicly documented in the security advisory, demonstrating the overflow condition under Miri and AddressSanitizer. Exploitation requires a local attack vector with high attack complexity (the attacker must supply a specially crafted JPEG XL image to a 32-bit application using the vulnerable library), and no privileges are required. There is no current evidence of in-the-wild exploitation, no known threat actor attribution, and the CVE status remains Reserved. EPSS score and CISA KEV catalog status are not available at this time (GitHub Advisory, jxl-oxide Advisory).

Exploitation steps

  1. Identify target: Locate a 32-bit application or service that uses jxl-grid ≤ 0.6.1 (part of jxl-oxide) to decode JPEG XL images.
  2. Craft malicious image — Path A (huge frame): Construct a JPEG XL bitstream with a frame dimension such as 65536×65536. This passes the library's area limit check (2^32 ≤ 2^40) but causes width * height to overflow usize on 32-bit, resulting in an undersized heap allocation.
  3. Craft malicious image — Path B (huge canvas, tiny crop): Alternatively, craft a bitstream with a small actual frame but a large canvas or requested region of interest. The composition step in blend.rs allocates an output grid sized to the canvas/ROI, triggering the overflow via render_frame().
  4. Trigger decoding: Deliver the crafted .jxl file to the target application (e.g., via file upload, email attachment, or any image-processing pipeline) and cause it to decode the image.
  5. Achieve out-of-bounds write: The undersized AlignedGrid backing buffer is allocated; subsequent writes through mutable subgrid references corrupt adjacent heap memory with attacker-influenced data, potentially enabling arbitrary code execution (GitHub Advisory, jxl-oxide Advisory).

Indicators of compromise

  • Process: Unexpected crashes or panics in applications using jxl-oxide/jxl-grid on 32-bit systems when processing JPEG XL images, particularly with large frame dimensions or large canvas sizes.
  • Logs: Application crash logs or core dumps referencing memory access violations or heap corruption originating from jxl-grid, jxl-render, or blend.rs code paths.
  • File System: Presence of unusually large or malformed .jxl files (e.g., frames claiming dimensions near or exceeding 65536×65536, or bitstreams with mismatched canvas and crop dimensions) in directories processed by the application.
  • Memory: AddressSanitizer or Valgrind reports of heap-buffer-overflow in AlignedGrid::with_alloc_tracker or subgrid write operations on 32-bit builds.

Mitigation and workarounds

Upgrade jxl-grid (and the parent jxl-oxide crate) to version 0.6.2 or later, which contains the fix for the unchecked integer multiplication. No configuration-based workaround is documented; the only reliable mitigation is updating to the patched version. As an interim measure, operators running 32-bit deployments that process untrusted JPEG XL images should restrict or sandbox image decoding until the upgrade can be applied (GitHub Advisory, jxl-oxide Advisory).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-52829HIGH7.5
  • Rust logoRust
  • zebra-network
NoYesAug 18, 2026
CVE-2026-52834HIGH7.3
  • Rust logoRust
  • jxl-grid
NoYesAug 19, 2026
GHSA-vjf8-9fx6-mv6xMEDIUM6.9
  • Rust logoRust
  • triton-vm
NoYesAug 18, 2026
GHSA-qwgh-2vcv-g2f7MEDIUM6.3
  • Rust logoRust
  • block_buffer
NoYesAug 19, 2026
CVE-2026-52739MEDIUM5.9
  • Rust logoRust
  • zebrad
NoYesAug 18, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management