CVE-2026-119186 is an AES-GCM authentication bypass in node-forge (digitalbazaar/forge) affecting versions <= 1.4.0. The root cause is that the GCM mode's start() method stored the tagLength option without validating it. When an application passes a zero-like tagLength (0, null, false, '', or '0'), the value converts to 0. During tag generation, afterFinish() computes 16 % (tagLength / 8) which becomes 16 % 0 = NaN, and truncating the 16-byte tag by NaN empties it. On decryption, the start-time check that the supplied tag has tagLength / 8 bytes passes for an empty tag (0 bytes), and the final comparison compares two empty strings, so decipher.finish() returns true for any attacker-chosen ciphertext.
The fix (commit 236845d96c71207259f91638d0138bba8e2fd624) validates tagLength in modes.gcm.prototype.start() in lib/cipherModes.js, restricting it to NIST SP 800-38D allowed values (128, 120, 112, 104, 96, 64, 32) and throwing 'Invalid tag length.' otherwise. The vulnerable functions are: (1) modes.gcm.prototype.start which lacked the validation, (2) modes.gcm.prototype.afterFinish which performs the tag truncation that empties the tag, and (3) BlockCipher.prototype.finish which is the public entry point returning the incorrect authentication success result.