CVE-2026-118779

Forge: Regular expression denial of service in PEM decoding (pem.decode)

Published Oct 29, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the affected implementation used pem.decode(), lib/pem.js, missing END line to process the relevant input or security decision. node-forge used polynomial-time regular expressions in pem.decode(), including when searching for a matching END line and parsing encapsulated headers. An unauthenticated attacker able to supply PEM input to any high-level parser could consume excessive CPU with a long malformed message and cause denial of service. This issue is fixed in version 1.4.1.

Analysis

AI-generated

Technical impact

Forge, also known as node-forge, is a JavaScript implementation of Transport Layer Security that processes PEM formatted data using regular expressions. The vulnerability exists in versions prior to 1.4.1 because the pem.decode() function fails to properly handle the END line and performs a polynomial‑time regular expression search on malformed input. An unauthenticated attacker can supply a long, malformed PEM message that forces the parser to perform excessive CPU work, ultimately exhausting system resources and causing the application to become unavailable. This flaw is a classic denial‑of‑service weakness rather than an information disclosure or code execution issue.

Affected Systems

Any system that incorporates digitalbazaar’s forge library and parses PEM data—including web applications, certificates services, and authentication modules—running a forge version earlier than 1.4.1 is susceptible. The impact is limited to the host running the library; the flaw cannot be leveraged to gain further privileges or exfiltrate data.

Risk and Exploitability

The CVSS score of 7.5 indicates moderate‑to‑high danger, while the EPSS score is currently unavailable, and the flaw is not listed in the CISA KEV catalog. Although the vulnerability is remotely exploitable via any sanitization‑unverified PEM input, its exploitation requires the ability to supply such input to the application. The lack of a known exploit but the potential for significant service disruption makes it prudent to treat the risk as moderate to high and address it promptly.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Forge to version 1.4.1 or later.
  • Validate and sanitize PEM input before passing it to pem.decode(), rejecting excessively long or malformed data.
  • Apply process isolation or CPU limiting measures such as cgroups, container quotas, or a web application firewall to mitigate potential denial‑of‑service attempts.

Generated by OpenCVE AI on October 29, 2026 at 21:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-7wch-p9px-956x Forge: Regular expression denial of service in PEM decoding (pem.decode)
History
Type Values Removed Values Added
CPEs cpe:2.3:a:digitalbazaar:forge:*:*:*:*:*:node.js:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Digitalbazaar
Digitalbazaar forge
Vendors & Products Digitalbazaar
Digitalbazaar forge
Type Values Removed Values Added
Description Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the affected implementation used pem.decode(), lib/pem.js, missing END line to process the relevant input or security decision. node-forge used polynomial-time regular expressions in pem.decode(), including when searching for a matching END line and parsing encapsulated headers. An unauthenticated attacker able to supply PEM input to any high-level parser could consume excessive CPU with a long malformed message and cause denial of service. This issue is fixed in version 1.4.1.
Title Forge: Regular expression denial of service in PEM decoding (pem.decode)
Weaknesses CWE-1333
CWE-400
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 29, 2026, 8:23 PM
Reserved
Oct 28, 2026, 7:20 PM
Status
Analyzed
Published
Oct 29, 2026, 7:17 PM
Modified
Nov 10, 2026, 7:34 PM
Severity
Important
Public date
Oct 29, 2026, 6:45 PM