Skip to main content

node-forge CVE-2026-125333

| EUVDEUVD-2026-122793 MEDIUM
Inefficient Regular Expression Complexity (ReDoS) (CWE-1333)
2026-11-10 security-advisories@github.com GHSA-6cv4-p8m7-4r25
5.9
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Victim app uses forge.http to fetch from untrusted server
  2. Delivery
    Server returns header value with long whitespace run plus trailing character
  3. Exploit
    readHeader()/getCookies() calls quadratic _trimString()
  4. Execution
    Regex rescans run at every position
  5. Impact
    Event loop blocked for minutes, denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim application to use the forge.http client with an application-provided socket pool (historically Flash sockets via forge.xhr) to communicate with a server it does not control, and to invoke response.readHeader() or response.getCookies() on attacker-influenced responses. forge.http is NOT loaded by require('node-forge') - it is only available via the forge.all bundle - so default node-forge usage is not affected. The trigger is a response header value containing a long whitespace run followed by a non-whitespace character; there is no limit on header size. Limiting factors: no authentication is needed from the attacker, but the attacker must be the server or on-path (able to shape the HTTP response), and the narrow forge.http+socket-pool deployment mode means few applications are reachable. The only impact is denial of service (event loop / browser tab blocking); there is no confidentiality or integrity effect. The vendor workaround is to limit HTTP response header size in the socket pool's data handler before passing it to forge.http; upgrading to 1.4.3 is the complete fix.

Impact

This is a moderate, availability-only ReDoS, and the signals are internally consistent rather than conflicting. The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H, 5.9) correctly captures a network-reachable, unauthenticated flaw with no confidentiality or integrity impact and only availability loss; the AC:H reflects that the victim must already be using forge.http with an application-supplied socket pool to talk to an untrusted server, not that triggering is complex once that path exists. The vendor's informational CVSS 4.0 (8.2) scores higher only because 4.0 lacks a direct AC:H counterpart and maps the condition to AT:P - the advisory explicitly says the severity rating should follow the 3.1 Moderate. No KEV listing and no EPSS score are provided in the input, so there is no evidence of active or widespread exploitation; the vuln.today Decision label is 'this_month', not act_now/emergency. A working proof-of-concept is published in the GHSA advisory, but PoC availability is distinct from exploitation and does not indicate in-the-wild use. The practical risk is bounded sharply by reachability: forge.http is not loaded by require('node-forge'), is only part of the forge.all bundle, and needs an application-provided socket pool (historically Flash sockets via forge.xhr), so the advisory states few applications use it. Net: a real but low-urgency, DoS-only issue for the small population that actually uses forge.http against untrusted servers.

Exploit ScenarioDerived

An application uses forge.http with a socket pool to fetch data from a server it does not control, and that server (or an on-path attacker modifying the response) returns an HTTP response header whose value is a long run of whitespace followed by a non-whitespace character. When response.readHeader() or response.getCookies() calls _trimString() on that value, the quadratic /\s*$/ regex rescans the whitespace run at every position, blocking the Node.js event loop (or browser tab) for seconds to minutes and denying service to everything else in the process. A published proof-of-concept in the GHSA advisory shows a ~40,000-character whitespace header taking about 4 seconds on Node.js 24, with a 1 MB header taking roughly 10 minutes.

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

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

Alert me

AnalysisAIv1 – Nov 11, 2026

Header-parsing denial of service in node-forge's optional forge.http client (versions 0.1.2 through 1.4.2) lets a malicious server or on-path attacker stall a client for minutes by returning a single response header containing a long whitespace run followed by a non-whitespace character, which forces a quadratic regular-expression trim inside response.readHeader() and response.getCookies(). Only applications that explicitly use forge.http with an application-provided socket pool against untrusted servers are reachable - forge.http is not loaded by require('node-forge') and ships only in the forge.all bundle - and the sole impact is availability loss from a blocked event loop or browser tab, with no confidentiality or integrity effect. The vendor advisory includes a public proof-of-concept snippet; it is not verified as working exploit code, and there is no indication of active exploitation (no CISA KEV listing). Fixed in 1.4.3.

RemediationAI

Vendor-released patch: node-forge 1.4.3 (release tag https://github.com/digitalbazaar/forge/releases/tag/v1.4.3), delivered by PR https://github.com/digitalbazaar/forge/pull/1169 and commit https://github.com/digitalbazaar/forge/commit/326a4d0903ee46358bc849a5c3fd96d9c21489bd; the commit replaces the quadratic trailing-whitespace regular expression in lib/http.js with a linear backwards loop and adds regression tests under tests/security/ghsa-6cv4-p8m7-4r25.js. Upgrading to 1.4.3 is the complete fix and does not change trimming behaviour. Applications that cannot upgrade immediately should apply the vendor's documented workaround: cap the size of HTTP response headers in the socket pool's data handler before handing the buffer to forge.http, which bounds the whitespace run the parser must scan - at the cost that oversized but legitimate responses will be truncated or rejected, so the cap must be chosen to fit expected server behaviour. Verify whether forge.http is used at all (it is absent from require('node-forge') and present only via the forge.all bundle plus an application-provided socket pool); if it is not, the upgrade is still recommended but the code path is not reachable.

Affected VersionsENISA

forge 0.1.2, < 1.4.3

Affected Packages

npm node-forge fix: 1.4.3
euvd forge fix: 1.4.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

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

Technical ContextAI · show details

node-forge is a pure-JavaScript implementation of TLS and related primitives, and its forge.http module is a legacy HTTP client that historically ran over Flash-provided sockets via forge.xhr. The flaw is a classic regular-expression denial of service (CWE-1333) in _trimString() in lib/http.js, which removed trailing whitespace with str.replace(/\s*$/, ''). On a string of n whitespace characters followed by a non-whitespace character, the engine attempts a match at each of the n positions and rescans the remainder of the run, yielding O(n^2) work. _trimString() is applied to every response header value parsed by response.readHeader() and again to cookie names and values in response.getCookies(), and no header-size limit is enforced, so an 80 KB header costs roughly 4 seconds and a 1 MB header roughly 10 minutes on Node.js 24. The upstream fix replaces the trailing-whitespace regex with a backwards character loop, producing identical trimmed output in linear time - the same approach lib/pem.js adopted in 1.4.1 for the related PEM-decoding ReDoS GHSA-7wch-p9px-956x. The CVSS 3.1 vector scores this 5.9 (AC:H, availability-only); the vendor notes the informational CVSS 4.0 score of 8.2 reflects AT:P rather than any additional loss of confidentiality or integrity.

Know when Forge 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 (github) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 5.9 MEDIUM

Network-reachable and unauthenticated (AV:N/PR:N), but AC:H because the victim must run forge.http with a socket pool against an untrusted server; availability-only, so C:N/I:N/A:H.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 5.9 MEDIUM

Primary rating from Vendor (github).

CVSS VectorVendor: github

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

Lifecycle Timeline

1
Patch available
Nov 10, 2026 - 20:20 EUVD

DescriptionCVE.org

Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. From 0.1.2 until 1.4.3, forge.http uses _trimString() in lib/http.js to remove trailing whitespace from response header values and cookie names and values with a regular expression that can take quadratic time. A malicious server or on-path attacker can supply a long whitespace run followed by a non-whitespace character in a response header, causing response.readHeader() or response.getCookies() to repeatedly scan the input and block the Node.js event loop or browser tab for minutes. Applications are affected only when they use forge.http with a socket pool to communicate with an untrusted server; forge.http is not loaded by require('node-forge'), and the issue has no confidentiality or integrity impact. This issue is fixed in version 1.4.3.

Threat Intelligence Overview

EPSS Score
0.6%
Top 53% exploitable
Prevalence
Low
node-forge is ubiquitous, but the vulnerable forge.http submodule is rarely used
Threat Intel
1
1 sources
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA MSRC Vendor GitHub

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.6%
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
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

31
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +30
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.

More in Forge

View all
CVE-2025-12816 HIGH POC
8.6 Nov 25

An interpretation-conflict (CWE-436) vulnerability in node-forge versions 1.3.1 and earlier enables unauthenticated atta

CVE-2020-7720 HIGH POC
7.3 Sep 01

The package node-forge before 0.10.0 is vulnerable to Prototype Pollution via the util.setPath function. Rated high seve

CVE-2026-118775 MEDIUM POC
5.3 Oct 29

OID-based authorization bypass in node-forge through 1.4.0: asn1.oidToDer() fails to range-check the first two arcs of a

CVE-2026-85393 HIGH
8.7 Sep 03

RSA PKCS#1 v1.5 signature forgery in node-forge through v1.4.0 enables unauthenticated network attackers to craft signat

CVE-2025-66031 HIGH
8.7 Nov 26

Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Rated high severi

CVE-2026-118779 HIGH
7.5 Oct 29

Regular expression denial of service in node-forge's pem.decode() allows remote, unauthenticated attackers to block the

CVE-2026-119191 HIGH
7.5 Oct 29

Denial of service in node-forge (Forge) 1.3.2 through 1.4.0 lets remote, unauthenticated attackers exhaust CPU time and

CVE-2026-119188 HIGH
7.5 Oct 29

Denial of service in node-forge's JavaScript TLS implementation: a connection created with forge.tls.createConnection()

CVE-2026-119187 HIGH
7.5 Oct 29

Call stack exhaustion in node-forge's TLS record processing (all versions through 1.4.0) allows a remote peer to crash o

CVE-2026-118782 HIGH
7.5 Oct 29

PKCS#12 MAC forgery and constant-key password-based decryption in node-forge 1.4.0 and earlier let anyone who does not k

CVE-2022-24772 HIGH
7.5 Mar 18

Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Rated high severi

CVE-2022-24771 HIGH
7.5 Mar 18

Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Rated high severi

Vendor StatusVendor

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