CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-41907

CVE-2026-41907: Out-of-Bounds Write in uuid npm Package via Missing Boundary Checks

Amit Schendel
Amit Schendel
Senior Security Researcher

May 5, 2026·6 min read·299 visits

Executive Summary (TL;DR)

CVE-2026-41907 is an out-of-bounds write vulnerability affecting the `uuid` JavaScript library prior to version 14.0.0. Missing buffer boundary validations in the v3, v5, and v6 UUID functions allow truncation of generated identifiers without triggering exceptions, enabling data integrity degradation and potential application-level exploitation.

The widely used `uuid` npm package suffers from an out-of-bounds write vulnerability in its v3, v5, and v6 generation functions. By passing an improperly sized buffer or offset, attackers can cause silent partial writes, leading to data corruption and application logic flaws.

Vulnerability Overview

The uuid package is a foundational component within the Node.js ecosystem, tasked with generating universally unique identifiers across various standard versions. Many applications rely on this library to create predictable or time-based identifiers for database records, session keys, and distributed system tracing.

CVE-2026-41907 represents an out-of-bounds write vulnerability (CWE-787) specifically affecting the v3, v5, and v6 generation routines. These specific functions expose an API allowing developers to supply an optional target buffer and a starting offset index. This feature is intended to optimize memory allocations by writing identifiers directly into large pre-allocated storage structures.

Unlike the secure v1 and v4 implementations, the affected functions lack explicit boundary validation for the caller-provided buffers. Consequently, providing an offset that exceeds the remaining capacity of the buffer forces the library to write out-of-bounds data. Because of the behavior of JavaScript typed arrays, this results in a silent failure state rather than terminating the process.

Root Cause Analysis

The fundamental flaw lies in the implementation discrepancy between different UUID generation functions within the library. While the v1, v4, and v7 modules incorporated strict length checks to ensure the target buffer could accommodate a full 16-byte write, the v3 (Name-based MD5), v5 (Name-based SHA-1), and v6 (Reordered time-based) routines omitted these crucial validations entirely.

When invoked with a Uint8Array or Node.js Buffer, the vulnerable functions initiate a sequential loop intending to assign exactly 16 bytes starting from the user-defined offset. The codebase assumes the allocated capacity is sufficient. No arithmetic validation computes whether offset + 16 exceeds buf.length before memory writes begin.

JavaScript handles out-of-bounds access on TypedArray objects by silently dropping the writes rather than throwing an explicit memory fault or standard exception. As the library blindly increments the index past the allocated buffer bounds, the underlying engine ignores the operation. This behavior masks the failure from the calling application, which operates under the assumption that a complete 16-byte UUID was successfully initialized.

Code Analysis

Prior to the fix introduced in version 14.0.0, the vulnerable logic resided primarily in src/v35.ts and src/v6.ts. The implementation retrieved the computed bytes and assigned them directly into the buffer array without preliminary bounds verification.

The vulnerable code block demonstrates the explicit absence of validation:

if (buf) {
  offset = offset || 0;
  for (let i = 0; i < 16; ++i) {
    buf[offset + i] = bytes[i]; // No check if offset + i < buf.length
  }
}

The project maintainers resolved the issue in commit 3d2c5b0342f0fcb52a5ac681c3d47c13e7444b34 by implementing a strict mathematical guard. The patch calculates the total required byte range and asserts it against the actual buffer length.

The patched implementation enforces a strict failure requirement:

if (offset < 0 || offset + 16 > buf.length) {
  throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
}

Exploitation and Attack Methodology

Exploiting CVE-2026-41907 requires an attacker to exert influence over either the offset parameter or the size of the target buffer passed to a vulnerable generation function. This scenario typically emerges in data processing applications that pre-allocate large buffers to handle batch operations. If the application derives the offset index from external inputs, the attacker can force out-of-bounds writes.

The attack execution phase relies entirely on the silent failure nature of the vulnerability. The attacker submits a malformed request specifying an offset situated fewer than 16 bytes from the end of the buffer. The function executes, writes only a truncated fraction of the UUID, and completes normally without signaling an error to the host application.

The available proof-of-concept demonstrates this behavioral difference unequivocally. Passing an 8-byte array to the secure v4 function immediately halts execution with a RangeError. Conversely, calling v5 or v6 with the identical 8-byte array suppresses the error entirely, leaving the application state compromised with a malformed identifier.

Impact Assessment

The primary impact of CVE-2026-41907 is degradation of data integrity and subsequent logical errors. Partially written identifiers directly corrupt the internal application state. If an old buffer is reused, the new identifier will consist of a newly written prefix fused with trailing bytes from the previous memory allocation, causing critical discrepancies in session tracking or record identification.

Truncated identifiers severely diminish the mathematical entropy necessary to guarantee identifier uniqueness. A successful attack drastically increases the statistical probability of identifier collisions. In systems leveraging UUIDs as security tokens, authentication tokens, or access keys, predictable identifiers enable authentication bypass mechanisms and authorization failures.

The assigned CVSS 4.0 vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U yields a base score of 8.1. This reflects a high impact on system integrity and availability. However, with an EPSS score of 0.00055, the immediate likelihood of mass exploitation is low, primarily because the vulnerability relies on specific application architecture patterns to be reachable.

Remediation and Detection

The definitive remediation for CVE-2026-41907 is upgrading the uuid package to fixed versions. Organizations operating on the mainline branch must transition to version 14.0.0. The maintainers have provided backported patches for legacy infrastructure, releasing versions 13.0.1, 12.0.1, and 11.1.1 to close the vulnerability across older deployment profiles.

Environments incapable of immediate package updates must implement custom bounds verification routines preceding all calls to v3, v5, and v6. Developers must verify that offset + 16 does not exceed the provided buffer's length property, discarding the operation or throwing an explicit exception if the check fails.

Security teams can identify vulnerable patterns using static analysis platforms like Semgrep or ESLint. Detection rules must flag instances where v3, v5, or v6 are invoked with a minimum of three arguments, specifically matching conditions where the target parameter is classified as a Buffer or Uint8Array. This highlights code paths requiring explicit bounds review.

Official Patches

GitHub AdvisoryGHSA Advisory and Patch Details

Fix Analysis (4)

Technical Appendix

CVSS Score
8.1/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
EPSS Probability
0.06%
Top 83% most exploited

Affected Systems

Node.js applications dependent on the `uuid` npm packageClient-side JavaScript relying on batch UUID generation using buffers

Affected Versions Detail

Product
Affected Versions
Fixed Version
uuid
uuidjs
< 14.0.014.0.0
uuid
uuidjs
>= 13.0.0, < 13.0.113.0.1
uuid
uuidjs
>= 12.0.0, < 12.0.112.0.1
uuid
uuidjs
>= 11.0.0, < 11.1.111.1.1
AttributeDetail
CWECWE-787
Attack VectorNetwork (Application Context)
CVSS Score8.1
EPSS Score0.00055
Exploit StatusProof of Concept
KEV ListedFalse

MITRE ATT&CK Mapping

T1203Exploitation for Client Execution
Execution
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-787
Out-of-bounds Write

The software writes data past the end, or before the beginning, of the intended buffer.

Vulnerability Timeline

Initial security advisory published via GHSA
2026-04-22
CVE-2026-41907 assigned and published
2026-04-24
Backport patches released for legacy branches (11.x, 12.x, 13.x)
2026-04-27
Research and verification of fix effectiveness
2026-05-04

References & Sources

  • [1]GitHub Security Advisory: GHSA-w5hq-g745-h8pq
  • [2]Fix Commit in Main Branch
  • [3]CVE.org Record
  • [4]NVD Vulnerability Detail

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-102276
7.5

CVE-2026-102276: Denial of Service via Uncontrolled Recursion and Argument-List Exhaustion in brace-expansion

CVE-2026-102276 is a high-severity Denial of Service (DoS) vulnerability impacting the 'brace-expansion' library, a popular Node.js utility designed to expand brace patterns into combinatorial lists. Due to uncontrolled recursion and argument-list stack exhaustion within the internal parseCommaParts function, remote attackers can trigger an unhandled RangeError that abruptly terminates the Node.js process.

Alon Barad
Alon Barad
2 views•7 min read
•about 2 hours ago•CVE-2026-102278
7.5

CVE-2026-102278: Stack-Based Denial of Service via Uncontrolled Recursion in brace-expansion

A stack-based Denial of Service (DoS) vulnerability via uncontrolled recursion in the brace-expansion library prior to versions 1.1.20, 2.1.6, 3.0.8, and 5.0.11 allows unauthenticated remote attackers to trigger native stack exhaustion, terminating the Node.js process via a crafted payload containing deeply nested brace groups.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 3 hours ago•CVE-2026-102277
5.3

CVE-2026-102277: Denial of Service via Quadratic Algorithmic Complexity in brace-expansion

An uncontrolled resource consumption vulnerability exists in the brace-expansion JavaScript library. Due to an algorithmic flaw in parsing a legacy Bash-compatibility quirk involving {a},b}-shaped expansion structures, untrusted inputs containing many trailing closing braces trigger successive full-input rescans. This behavior yields quadratic CPU time complexity and high memory overhead, allowing remote, unauthenticated attackers to cause a Denial of Service (DoS) by blocking the single-threaded Node.js event loop.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 4 hours ago•CVE-2026-17495
5.9

CVE-2026-17495: Path Traversal via Type Confusion in Moment.js Dynamic Locale Loading

Moment.js versions 2.29.2 through 2.30.1 are vulnerable to a Path Traversal flaw (CWE-27) on server-side Node.js environments when dynamic locales are configured. The vulnerability stems from an object-coercion bypass in the locale-name sanitization routine, which assumes incoming variables are string primitives. An attacker can pass a structured object with custom 'match' and 'toString' properties to bypass regex-based directory checks, leading to arbitrary file loading via Node's internal 'require()' call.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 6 hours ago•CVE-2026-101911
6.3

CVE-2026-101911: Denial of Service via Uncontrolled Resource Consumption in ip-address Library

A denial-of-service vulnerability exists in the ip-address npm package prior to version 10.7.1. The library fails to limit the length of input strings parsed by the Address4 and Address6 constructors. When parsing highly malformed addresses, the diagnostic parser runs a synchronous regular expression search-and-replace that generates descriptive HTML error messages. Passing an excessively long string containing invalid characters causes severe memory amplification and CPU starvation, resulting in a thread hang or process crash in Node.js applications.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 7 hours ago•CVE-2026-101912
6.3

CVE-2026-101912: Cross-Family IP Address Subnet Containment Logic Bypass in ip-address Library

The ip-address library is vulnerable to a logical bypass in its subnet containment methods. The functions isInSubnet() and isHostInSubnet() do not verify that compared addresses belong to the same IP family before performing masking checks. Under specific circumstances, an IPv6 address can share leading bit patterns with an IPv4 subnet, causing the containment check to evaluate as true. This allows attackers to bypass access control lists, firewalls, and server-side request forgery protection layers in applications relying on the library.

Amit Schendel
Amit Schendel
6 views•6 min read