Improper Validation of Specified Quantity in Input Affecting org.webjars.npm:node-forge package, versions [,1.4.1)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.21% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGWEBJARSNPM-22113983
  • published1 Nov 2026
  • disclosed30 Oct 2026
  • creditUnknown

Introduced: 30 Oct 2026

NewCVE-2026-119186  (opens in a new tab)
CWE-1284  (opens in a new tab)
CWE-354  (opens in a new tab)

How to fix?

Upgrade org.webjars.npm:node-forge to version 1.4.1 or higher.

Overview

org.webjars.npm:node-forge is a WebJar for node-forge.

Affected versions of this package are vulnerable to Improper Validation of Specified Quantity in Input in the modes.gcm.prototype.start method in lib/cipherModes.js. An attacker can have forged ciphertext accepted as authentic, and alter known plaintext to chosen values, by supplying an empty authentication tag, because a zero-like tagLength is stored without validation and afterFinish() computes truncate(16 % (tagLength / 8)), which for a zero value evaluates to 16 % 0 = NaN and empties the tag, so decipher.finish() compares two empty strings and returns true. This is reached only when the application calls forge.cipher.createDecipher('AES-GCM', ...) with a zero-like tagLength, such as one derived from the received tag length or an unset configuration value, while the default 128-bit tag and any fixed valid tagLength are unaffected.

CVSS Base Scores

version 4.0
version 3.1