CVE-2026-8813 Overview
CVE-2026-8813 is a denial of service vulnerability in the exifreader npm package affecting versions before 4.39.0. A crafted image containing an ICC mluc (multiLocalizedUnicode) tag can specify an attacker-controlled record count combined with a zero record size. During parsing, ExifReader repeatedly processes the same record and appends entries to an array without sufficient bounds validation. This behavior causes excessive memory growth and can exhaust application memory. The flaw is classified under [CWE-1284] (Improper Validation of Specified Quantity in Input) and impacts any application that parses attacker-supplied images using the affected library.
Critical Impact
Remote attackers can trigger memory exhaustion in any service that parses untrusted images with ExifReader, leading to denial of service without authentication or user interaction.
Affected Products
- exifreader npm package versions prior to 4.39.0
- Web applications and services that parse user-supplied images using ExifReader
- Node.js and browser-based image processing pipelines depending on the affected versions
Discovery Timeline
- 2026-05-19 - CVE-2026-8813 published to NVD
- 2026-05-19 - Last updated in NVD database
Technical Details for CVE-2026-8813
Vulnerability Analysis
The vulnerability resides in the ICC profile parser within src/icc-tags.js. ICC profiles can contain mluc tags that encode multilingual strings as a series of records. Each mluc tag declares a record count and a record size in its header. ExifReader iterates through these records and appends parsed entries to an internal array. The parser fails to validate that the declared record size is non-zero or that the record count is bounded relative to the buffer length. An attacker who controls the image input can therefore drive the parser into an effectively unbounded loop that grows an array in memory until the host process exhausts available heap space.
Root Cause
The root cause is missing bounds validation on two attacker-controlled fields in the ICC mluc tag: the record count and the record size. When the record size is zero, the parser does not advance through the buffer between iterations, causing it to re-process the same offset repeatedly. Each iteration allocates and appends a new entry to the output array. With an attacker-controlled record count, the loop length is dictated entirely by hostile input, fitting the pattern described by [CWE-1284].
Attack Vector
Exploitation requires only that the target application parse an attacker-supplied image. No authentication or user interaction is needed beyond submitting the image. The attack vector is network-reachable in typical deployments such as avatar uploaders, image processing APIs, and content management systems. The result is process-level denial of service through memory exhaustion rather than code execution or data exposure.
// Security patch in src/icc-tags.js - Add bounds checks to ICC mluc tag parsing
}
export function parseTags(dataView) {
+ const MIN_MULTI_LOCALIZED_UNICODE_RECORD_SIZE = 12;
+ const MULTI_LOCALIZED_UNICODE_RECORDS_OFFSET = 16;
const buffer = dataView.buffer;
const length = dataView.getUint32();
// Source: https://github.com/mattiasw/ExifReader/commit/c9d88b67e127b2dcc7b46e328df468257fb2dc30
The fix introduces a MIN_MULTI_LOCALIZED_UNICODE_RECORD_SIZE constant of 12 bytes. The patched parser rejects or skips mluc records that declare a smaller size, eliminating the zero-size iteration loop.
Detection Methods for CVE-2026-8813
Indicators of Compromise
- Node.js processes terminating with JavaScript heap out of memory or FATAL ERROR: Reached heap limit errors shortly after image upload requests.
- Repeated crashes or restarts of image-processing workers correlated with specific client IPs submitting image payloads.
- Inbound requests containing image files with ICC profiles whose mluc tag declares large record counts paired with zero or undersized record sizes.
Detection Strategies
- Inventory dependencies using npm ls exifreader across services and flag any version below 4.39.0.
- Inspect uploaded images at the gateway and parse ICC mluc tag headers, alerting on record sizes below 12 bytes or implausibly large record counts.
- Add resource-usage thresholds to image-handling services so that anomalous memory growth during parsing triggers alerts before the process is killed.
Monitoring Recommendations
- Monitor heap usage and out-of-memory exit codes for any Node.js service that ingests user-supplied images.
- Log and retain image metadata parsing failures with sufficient context to attribute requests to source IPs and accounts.
- Correlate upload traffic spikes with parser crashes in a centralized logging or SIEM platform to identify abuse patterns early.
How to Mitigate CVE-2026-8813
Immediate Actions Required
- Upgrade exifreader to version 4.39.0 or later in all projects using npm install exifreader@^4.39.0 and rebuild affected services.
- Audit transitive dependencies with npm audit or npm ls exifreader to find indirect inclusions of the vulnerable package.
- Restrict maximum image upload size and enforce per-request memory or time limits on image parsing workers to contain residual risk during rollout.
Patch Information
The vulnerability is fixed in exifreader 4.39.0. The corrective commit is c9d88b67e127b2dcc7b46e328df468257fb2dc30, which adds bounds checks to ICC mluc tag parsing in src/icc-tags.js. See the GitHub commit log for ExifReader and the Snyk vulnerability report for full technical details.
Workarounds
- If upgrading immediately is not feasible, strip or sanitize ICC profiles from incoming images using a pre-processing tool such as ImageMagick or exiftool before passing data to ExifReader.
- Run image parsing in isolated worker processes with hard memory limits so that an exhausted worker cannot affect the parent service.
- Apply rate limiting and per-account upload quotas at the application gateway to reduce the impact of repeated malicious submissions.
# Configuration example: upgrade and verify the patched version
npm install exifreader@^4.39.0
npm ls exifreader
# Optional: strip ICC profiles before parsing
exiftool -icc_profile= input.jpg -o sanitized.jpg
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

