CVE-2026-16402
Severity ModerateAn unchecked 32-bit width x height multiplication sized the JPEG XL decoder's CMYK K-buffer, under-allocating it and allowing a heap out-of-bounds read. The adjacent buffer already used a checked integer type; the K-buffer did not.
Reported privately with a self-contained ASan and UBSan proof-of-concept. The fix I suggested - size the buffer with a checked integer type, exactly as the adjacent buffer already did - was the one adopted.
- Severity
- Moderate, as rated by Mozilla
- Class
- Integer overflow leading to a heap out-of-bounds read
- Component
- Graphics: ImageLib
- File
- image/decoders/nsJXLDecoder.cpp
- Fixed in
- Firefox 153 ยท Thunderbird 153
- Credit
- Kai Martin, Mozilla Foundation Security Advisories
- Reported
- July 2026
pixel buffer CheckedInt<size_t> width * height // checked
CMYK K-buffer uint32_t width * height // unchecked