highCVSS 7.5Vulnerability

CVE-2026-85715

## Summary ExifReader 4.41.0 is vulnerable to denial of service through a crafted HEIC or AVIF file with a malicious `iloc` box. When `offsetSize`, `lengthSize`, and `baseOffsetSize` are set to zero in the iloc header, the extent-parsing loop allocates an unbounded number of JavaScript objects - up to `itemCount × extentCount` (65535 × 65535 = 4.3 billion) - without advancing the buffer offset. A 652-byte file causes 400MB of heap growth; a 6KB file exhausts all system memory and crashes the Node.js process with a JavaScript heap out-of-memory error. ## Affected version tested - npm package: `exifreader` - Version: `4.41.0` - Affected formats: HEIC, AVIF (ISO-BMFF container) ## Root cause **File:** `src/image-header-iso-bmff-iloc.js`, lines 79–116, function `getItems()`. The iloc parser reads four size fields from the file (each a 4-bit nibble, valid values 0–15): | Field | Controls | |-------|----------| | `offsetSize` | Bytes per extent offset | | `lengthSize` | Bytes per extent length | | `baseOffsetSize` | Bytes per item base offset | | `indexSize` | Bytes per extent index | The code then enters a nested loop: for each item (up to 65535), and for each extent within that item (up to 65535), it reads variable-width fields and advances the buffer offset by the corresponding size: ```javascript for (let j = 0; j < item.extentCount; j++) { const extent = {}; extent.extentIndex = getExtentIndex(dataView, version, offset, indexSize); offset += sizes.item.extent.extentIndex; // 0 when indexSize=0 extent.extentOffset = getVariableSizedValue(dataView, offset, offsetSize); offset += sizes.item.extent.extentOffset; // 0 when offsetSize=0 extent.extentLength = getVariableSizedValue(dataView, offset, lengthSize); offset += sizes.item.extent.extentLength; // 0 when lengthSize=0 item.extents.push(extent); // allocates unconditionally } ``` When all four size fields are zero (a valid value per the ISO

Properties

ghsa_id
GHSA-pj96-35fp-cfcc
summary
ExifReader: DoS via Crafted HEIC/AVIF iloc Box - Memory Exhaustion
severity
high
cvss_score
7.5
cve_id
CVE-2026-85715
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
signal_observed_at
2026-09-17T21:32:40+00:00
is_ghsa_only
false
ghsa_published
2026-09-17T16:30:00Z
source_url
https://github.com/advisories/GHSA-pj96-35fp-cfcc
ghsa_updated
2026-09-17T16:30:01Z

Related Entities (5)

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]npm/exifreader

AFFECTS (1)

[Software]npm/exifreader

HAS_WEAKNESS (2)

[Weakness]Loop with Unreachable Exit Condition ('Infinite Loop')
[Weakness]Memory Allocation with Excessive Size Value

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-85715 (CVSS 7.5) — Ninja Signal Threat Intelligence | Ninja Signal