CVE-2026-21713

Public on 2026-03-27
Modified on 2026-03-27
Description
A flaw in Node.js HMAC verification uses a non-constant-time comparison when validating user-provided signatures, potentially leaking timing information proportional to the number of matching bytes. Under certain threat models where high-resolution timing measurements are possible, this behavior could be exploited as a timing oracle to infer HMAC values.

Node.js already provides timing-safe comparison primitives used elsewhere in the codebase, indicating this is an oversight rather than an intentional design decision.

This vulnerability affects 20.x, 22.x, 24.x, and 25.x.

NOTE: https://nodejs.org/en/blog/vulnerability/march-2026-security-releases#timing-side-channel-in-hmac-verification-via-memcmp-in-crypto_hmaccc-leads-to-potential-mac-forgery-cve-2026-21713---medium
Severity
Medium severity
Medium
See what this means
CVSS v3 Base Score
5.6
See breakdown

Affected Packages

Platform Package Release Date Advisory Status
Amazon Linux 2023 nodejs Not Affected
Amazon Linux 2023 nodejs20 Pending Fix
Amazon Linux 2023 nodejs22 Pending Fix
Amazon Linux 2023 nodejs24 Pending Fix

CVSS Scores

Score Type Score Vector
Amazon Linux CVSSv3 5.6 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L