All posts

node-forge’s new advisories: upgrade to 1.4.3, and check how you use it.

node-forge 1.4.1 and 1.4.3 fix a batch of advisories: PKCS#12 and certificate-chain flaws, PEM ReDoS and TLS client crashes. What each needs, and how to check.

Published
Reading time
7 min
By
Girish Babu GV

What happened#

node-forge is a widely used npm package that implements TLS, X.509 certificates, PKCS#12 and other cryptography in JavaScript. The project’s maintainers published two groups of advisories against it. The first group went up on 27 October 2026; the registry shows 1.4.1 published that day, followed by 1.4.2 a few hours later. The second group went up on 4 November, and 1.4.3 is timestamped in the registry shortly after midnight UTC on the same date.

The project’s advisory list shows ten advisories on its first page, all from these two dates. The five in the first table below are rated High, the other 27 October items I saw are Low or Moderate, and the 4 November items are Moderate or Low. For each, the advisory says the rating follows CVSS 3.1 and gives a CVSS 4.0 figure for information only. That is why you will see numbers such as 7.5 in the advisory and 8.7 as a second figure.

One detail worth knowing: the PKCS#12 advisory credits its reporter “in collaboration with Claude and Anthropic Research”. That is what the advisory says; I haven’t looked into how the find was made.

The advisories#

Two tables, so you can match them to the parts of the library your code uses. Everything below is from the advisories themselves.

27 October 2026: fixed in 1.4.1 (all affect 1.4.0 and earlier)
AdvisoryAreaWhat the advisory saysSeverity
GHSA-5x38-2vff-x55pCertificate chains (CVE-2026-119190)Chain verification can be fooled by a deprecated extension identifier, so a non-CA certificate may be treated as a CA. Needs a trusted CA that copies extensions from certificate requests.High (CVSS 3.1: 7.4)
GHSA-jc66-7q78-782gPKCS#12 (CVE-2026-118782)A zero MAC iteration count makes key derivation ignore the password, so a tampered file can verify under any password. PBES2 content is not affected.High (7.5)
GHSA-7wch-p9px-956xPEM parsing (CVE-2026-118779)Regular expressions in pem.decode can take polynomial or quadratic time on crafted input, blocking the event loop.High (7.5)
GHSA-8hrf-8g6f-7xwpTLS records (CVE-2026-119188)A wrong-type record in the middle of a split handshake makes process() throw after the connection already failed, which can crash a Node.js process.High (7.5)
GHSA-hqq3-7jhf-c5jxTLS records (CVE-2026-119187)Many tiny records in one chunk exhaust the call stack, which can crash a Node.js process. The advisory says no authentication is needed.High (7.5)

The same listing also shows further 27 October advisories rated Low or Moderate, among them AES-GCM with an unvalidated tagLength option (Moderate) and a certificate signature checked with the issuer’s RSA scheme (Low). I didn’t read those in full, so I don’t describe them here.

4 November 2026: fixed in 1.4.3
AdvisoryAreaWhat the advisory saysSeverity
GHSA-6cv4-p8m7-4r25forge.httpInefficient whitespace trimming in response headers and Set-Cookie values; a long header can stall the client. Affects 0.1.2 through 1.4.2.Moderate (5.9)
GHSA-w4xr-hqv8-ch44forge.tls clientThe client accepts an unsupported compression method chosen by the server and then throws, which can crash a process that doesn’t catch it. Servers built on forge.tls are not affected.Moderate (5.9)
GHSA-j8rw-jp99-435vforge.tls clientA ServerHello received when the client has no active session throws an uncaught TypeError. Servers are not affected.Moderate (5.9)
GHSA-6889-vf6x-f3g5Ed25519verify() accepts small-order public keys, so signatures can be forged for a public key the attacker chooses. Keys from normal key generation are not affected.Low (3.7)

Am I affected?#

Two questions decide it: is the package present, and do you reach the affected code with input you don’t control. The advisories describe the second part like this:

  • PEM parsing: services that pass untrusted PEM data (uploaded certificates, keys or certificate requests) into any node-forge function that parses PEM.
  • PKCS#12: applications that import PKCS#12 files or encrypted private keys from untrusted sources and rely on the password for integrity.
  • Certificate chains: applications that call verifyCertificateChain(), including forge’s own TLS peer verification. The advisory adds that exploitation also needs a trusted CA that copies extensions from certificate requests.
  • TLS: code that uses forge.tls, forge.http or forge.xhr and passes socket data to connection.process() without catching exceptions. For the 4 November client crashes, the advisories say servers built on forge.tls are not affected.
  • Ed25519: only if you verify signatures against a public key an attacker can choose.

If you only have node-forge as a transitive dependency of a tool that you run during development, the advisories give no basis for saying you are exposed. The question is whether the library’s affected functions run on untrusted input in your deployed code.

What to do now#

  1. Find out whether you have it. Run the commands below in each project. Look at both the version and which package pulls it in.
  2. Upgrade to 1.4.3 or later. The registry lists 1.4.3 as latest. If a parent package pins an older node-forge, use your package manager’s override feature, or update the parent, and re-run the check afterwards.
  3. Wrap connection.process() in try/catch wherever you use forge.tls. Several advisories give this as their workaround, and it is cheap defence even after upgrading.
  4. Limit the size of untrusted input before it reaches PEM parsing or forge.http. The PEM advisory says a size limit reduces the impact but does not remove the flaw; upgrading is the fix.
  5. Review CA practice if you run one. For the certificate-chain advisory, the workaround lines include not copying unrecognised extensions from certificate requests.
Check, then update
# Is it in your tree, and who pulls it in?
npm ls node-forge

# Which version resolves?
npm ls node-forge --all | grep node-forge

# Upgrade it if it's a direct dependency
npm install node-forge@latest

# If it's only transitive, add an override in package.json, then reinstall:
#   "overrides": { "node-forge": "^1.4.3" }
npm install

How I checked this site#

This site is a Next.js project on Vercel. I searched its package-lock.json for node-forge and found no match, so this site doesn’t include the package in its dependency tree. That check covers this repository only.

What the sources don’t say#

  • Whether any of these has been exploited. The advisories I read don’t say so.
  • Which popular packages depend on a vulnerable version. I haven’t checked that, and the advisories don’t list dependents.
  • The 4 November advisories carry no CVE IDs in what I read, and I did not read every Low and Moderate advisory from 27 October.
  • I did not read independent press coverage of this batch. My second source is the npm registry (versions and dates) and GitHub’s advisory database listing of the same items.

My take#

My own opinion, not from the advisories.

The useful lesson isn’t one bug. It is that a crypto library in your tree can be a dependency you didn’t pick, and that most of these issues only bite when untrusted input reaches a specific function. Knowing where npm ls says it comes from, and whether your code feeds it outside data, answers most of the question in a few minutes. When a library gets a cluster of advisories in a short time, upgrading past all of them in one go is simpler than judging them one by one.

Sources#

Keep reading

Esc