Skip to main content

ExifReader EUVDEUVD-2026-77628

| CVE-2026-53496 MEDIUM
Uncaught Exception (CWE-248)
2026-07-17 https://github.com/mattiasw/ExifReader GHSA-g77h-45rf-hcx4
5.3
CVSS 3.1 · Vendor: https://github.com/mattiasw/ExifReader
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted HEIC/AVIF buffer via upload or URL
  2. Delivery
    Application calls ExifReader.load() without try/catch
  3. Exploit
    ftyp box passes format detection
  4. Execution
    parseBox() or getBoxLength() reads out-of-bounds DataView offset
  5. Persist
    Uncaught RangeError propagates through call stack
  6. Impact
    Request handler or worker process aborts

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Exception handling completeness
Exploitation Conditions

The attacker must be able to supply image data processed by ExifReader.load() or the async file/URL loaders - typically via a file upload endpoint, a URL-fetch feature, or any pipeline that accepts user-controlled image paths. The crafted input must begin with a valid HEIC or AVIF ftyp box (major brand heic or avif) to pass format detection, followed by any malformed ISO-BMFF box: either an 8-byte empty box (e.g., free or an unknown four-character code) or a truncated extended-size box (boxLength=1 with fewer than 16 bytes total). The application must not catch the resulting Error from the parse call - this is the limiting condition that determines actual DoS impact. Applications that already handle parse exceptions, that only process trusted image sources, or that use image formats other than HEIC and AVIF are not exploitable. There is no special server configuration or non-default setting required; any deployment of the affected ExifReader version that processes user-supplied HEIC/AVIF images is potentially vulnerable.

Impact

The CVSS 3.1 score of 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L) correctly captures the threat envelope: purely availability impact, no authentication required, low attack complexity, but limited scope (no confidentiality or integrity loss). EPSS data was not provided; given the narrow, single-library scope and the absence of a KEV listing, real-world exploitation probability is likely low despite the trivially constructable payload. The practical blast radius is critically dependent on the embedding application's error-handling discipline - applications already wrapping ExifReader.load() in try/catch are entirely unaffected. There is no CISA KEV listing confirming active exploitation. The advisory itself contains a working reproduction script, which constitutes functional proof-of-concept code rather than just a description, slightly elevating realistic exploitability compared to CVEs with no reproduction guidance. Overall, this is a genuine medium-priority issue for internet-facing image-processing services accepting HEIC/AVIF uploads, and a low-priority issue for applications with robust error handling or those not processing untrusted images.

Exploit ScenarioDerived

An attacker submitting images to a service that uses ExifReader constructs a minimal binary buffer: a valid 16-byte HEIC ftyp box followed by a single 8-byte free box with no content, totaling roughly 24 bytes. When the application passes this buffer to ExifReader.load() without a surrounding try/catch, the ISO-BMFF parser successfully identifies the file as HEIC, enters findMetaBox(), and triggers a RangeError from parseBox() that propagates uncaught up through the call stack, aborting the current request handler or Node.js worker and causing a denial of service. The advisory's embedded reproduction script makes this scenario immediately replicable.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 17, 2026

Denial of service in ExifReader 4.40.0 allows any remote, unauthenticated attacker to abort a Node.js request handler or worker by supplying a crafted ~24-byte HEIC or AVIF image buffer. The ISO-BMFF parser in src/image-header-iso-bmff.js lacks bounds checks before DataView reads, causing a native RangeError to escape internal catch blocks and propagate uncaught to the embedding application. No public exploit tool exists and the vulnerability is not listed in CISA KEV, but a fully working reproduction script is embedded in the GitHub Security Advisory GHSA-g77h-45rf-hcx4, and the fix was shipped in v4.40.1.

RemediationAI

Upgrade the exifreader npm package to version 4.40.1, the vendor-confirmed fix release documented at https://github.com/mattiasw/ExifReader/releases/tag/v4.40.1. Version 4.40.1 adds explicit bounds checks before every DataView read in the ISO-BMFF parser, covering the extended-size field in getBoxLength(), full-box version bytes in parseBox(), and sub-box descent in parseSubBoxes(). For applications that cannot immediately upgrade, wrap all ExifReader.load() and async loader invocations in a try/catch block that catches Error - this prevents the uncaught exception from terminating the request handler or worker, though it does not fix the underlying parser defect and parse failures should be logged to preserve visibility. As an additional layer, rejecting uploaded files smaller than a minimum threshold (e.g., under 32 bytes for HEIC/AVIF) before passing them to the parser will eliminate the minimal-buffer attack vectors described in the advisory.

Affected VersionsENISA

exifreader < 4.40.1

Affected Packages

npm exifreader fix: 4.40.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

ExifReader (pkg:npm/exifreader) is a JavaScript/Node.js library for extracting EXIF, XMP, and IPTC metadata from images, including the ISO Base Media File Format (ISO-BMFF) container used by HEIC and AVIF. The affected parsing logic in src/image-header-iso-bmff.js has three missing bounds-check sites: findMetaBox() only validates 8 bytes of header before delegating to parseBox(); parseBox() unconditionally reads full-box version bytes for meta, iloc, iinf, and idat box types without confirming sufficient remaining data; and getBoxLength() calls dataView.getUint32(offset + 8) to read the high word of a 64-bit extended size field (triggered when boxLength === 1) without verifying the field is present. JavaScript's DataView API throws a native RangeError: Offset is outside the bounds of the DataView on any out-of-bounds read, and because these throws occur after format detection has already succeeded (the ftyp box is valid), they escape the parser's surrounding catch blocks. CWE-248 (Uncaught Exception) precisely describes the root cause: a predictable exception class is reachable from external input but never caught by the library.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/mattiasw/ExifReader) PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
vuln.today AI 5.3 MEDIUM

Network-reachable via image upload with no auth required, low complexity; impact is availability-only via uncaught exception, no confidentiality or integrity loss.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/mattiasw/ExifReader).

CVSS VectorVendor: https://github.com/mattiasw/ExifReader

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

DescriptionCVE.org

Summary

ExifReader 4.40.0 can throw an uncaught RangeError: Offset is outside the bounds of the DataView while parsing crafted HEIC/AVIF files. The file only needs a valid leading ftyp box with a HEIC/AVIF major brand followed by a malformed ISO-BMFF box, such as an empty 8-byte free box or a truncated extended-size box.

This is reachable through the public ExifReader.load() API for in-memory buffers and through the async file/URL loaders when an application parses attacker-supplied images. In applications that do not wrap every parse in a defensive try/catch, a single uploaded or fetched image can abort the request/worker and cause a denial of service.

Credit requested: Yaohui Wang.

Affected version tested

  • npm package: exifreader
  • Version: 4.40.0
  • Repository commit tested: 8cb0261a26b7d986955fe0a6780f076dcb7902e7

Root cause

The ISO-BMFF parser assumes that every top-level box with at least an 8-byte header also has enough bytes for the fields required by its parsed form. In src/image-header-iso-bmff.js:

  • findMetaBox() calls parseBox(dataView, offset) while only checking that offset + 8 <= dataView.byteLength.
  • parseBox() calls getBoxLength() and then unconditionally reads fields such as the full-box version byte for meta/iloc/iinf/idat boxes.
  • getBoxLength() handles boxLength === 1 by calling hasEmptyHighBits(dataView, offset), which reads dataView.getUint32(offset + 8) without first checking that the 64-bit extended size field is present.

As a result, syntactically small or truncated boxes after a valid HEIC/AVIF ftyp box escape the format-detection catch blocks and throw from the main parsing path.

Reproduction

Run this from the repository root against the committed dist/exif-reader.js bundle:

js
const ExifReader = require('./dist/exif-reader.js');

function u32be(n) {
  return [(n >>> 24) & 255, (n >>> 16) & 255, (n >>> 8) & 255, n & 255];
}
function ascii(s) {
  return Array.from(Buffer.from(s, 'ascii'));
}
function box(type, content = []) {
  return [...u32be(8 + content.length), ...ascii(type), ...content];
}

for (const brand of ['heic', 'avif']) {
  for (const badBox of ['free', 'abcd']) {
    const bytes = Uint8Array.from([
      ...box('ftyp', ascii(brand)),
      ...box(badBox), // 8-byte box header with no content
    ]);

    try {
      ExifReader.load(bytes.buffer);
      console.log(`${brand}/${badBox}: no throw`);
    } catch (e) {
      console.log(`${brand}/${badBox}: ${e.name}: ${e.message}`);
      console.log(String(e.stack).split('\n').slice(0, 6).join('\n'));
    }
  }
}

Observed output on Node v23.11.0 with ExifReader 4.40.0:

text
heic/free: RangeError: Offset is outside the bounds of the DataView
RangeError: Offset is outside the bounds of the DataView
    at DataView.prototype.getUint8 (<anonymous>)
    at parseBox (.../dist/exif-reader.js:1:16513)
    at findMetaBox (.../dist/exif-reader.js:1:19032)
    at findOffsets (.../dist/exif-reader.js:1:19101)

heic/abcd: RangeError: Offset is outside the bounds of the DataView
avif/free: RangeError: Offset is outside the bounds of the DataView
avif/abcd: RangeError: Offset is outside the bounds of the DataView

A second variant triggers the extended-size path:

js
const truncatedExtendedBox = [...u32be(1), ...ascii('free')];
const heic = Uint8Array.from([...box('ftyp', ascii('heic')), ...truncatedExtendedBox]);
ExifReader.load(heic.buffer);

That throws from hasEmptyHighBits() / getBoxLength() because the extended-size high/low fields are not present.

Expected behavior

Malformed/truncated metadata boxes should be handled like other malformed metadata in the project: return only the successfully parsed file type/metadata, return no app markers, or throw a controlled project-specific error. A safe JavaScript bounds error should not escape from the parser for an attacker-controlled image container.

Security impact

This is a denial-of-service issue for services that parse user-provided HEIC/AVIF files with ExifReader. A minimal attacker-controlled image buffer can cause an unhandled exception in the parser and abort the surrounding request/worker if the embedding application does not catch every parse error.

Suggested severity: Medium. Suggested CVSS: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.

Suggested fix

Add explicit bounds checks before every DataView read in the ISO-BMFF box parser, especially:

  • before reading the 64-bit extended size fields in getBoxLength();
  • before reading the full-box version byte in parseBox();
  • before descending into parseSubBoxes() when a declared box length exceeds available bytes;
  • ensure findMetaBox() breaks on boxes whose declared length is invalid or not fully present.

A regression test should cover ftyp/heic and ftyp/avif followed by an 8-byte empty free/unknown box and by a truncated extended-size box.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 5 npm packages depend on exifreader (4 direct, 1 indirect)

Ecosystem-wide dependent count for version 4.40.1.

Threat Intelligence Overview

EPSS Score
0.5%
Top 62% exploitable
Prevalence
Medium
popular npm image-metadata library, not a universal runtime dependency
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy