unstale

npm / node-forge

node-forge

What changed in node-forge 1, from its official release notes, upgrade guides and advisories. Also covers @types/node-forge. Sources checked 2026-11-23.

18 breaking25 security6 new APIs and options4 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

node-forge 153 changes

Breaking changes 18

  • Certificate-chain verification now enforces CA name constraints against supported certificate names; violations fail with bad_certificate, and critical constraints can verify when satisfied.

    1.4.3release notes

  • A TLS client now fails the handshake with an illegal_parameter alert if the ServerHello selects a compression method other than none.

    1.4.3release notes

  • BIT STRING contents are decoded only one level deep. Code relying on nested decoding must parse the inner value separately after its leading unused bits octet.

    1.4.1release notes

  • The maxDepth recursion limit now applies when decoding ASN.1 from BIT STRING contents; contents exceeding the limit remain undecoded.

    1.4.1release notessecurity advisory

  • Rejects OIDs with invalid first arcs or an out-of-range second arc under first arc 0 or 1, rather than encoding them as a different OID.

    1.4.1release notes

  • CBC and ECB decryption now requires valid PKCS#7 padding. To decrypt data using other padding schemes, disable automatic unpadding and remove padding in application code.

    1.4.1release notessecurity advisory

  • Only NIST-defined tag lengths are accepted; null or undefined now selects the 128-bit default, and invalid lengths throw an error.

    1.4.1release notessecurity advisory

  • PKCS#12 key derivation rejects iteration counts below one; this also applies to pkcs12.generateKey() and affects MACs and password-based encryption.

    1.4.1release notes

  • Chain verification now enforces a CA certificate's pathLenConstraint even when that certificate has no keyUsage extension.

    1.4.1release notessecurity advisory

  • Verification now requires a canonical DER DigestInfo, preventing forged signatures that use extra ASN.1 fields or non-canonical encodings.

    1.4.1release notessecurity advisory

  • The TLS client handshake now fails with an insufficient_security alert when the server sends no certificate, including when the verify callback accepts it.

    1.4.1release notes

  • Removed the debug API because it had the potential for prototype pollution.

    1.0.0release notes

  • Removed this alias to address URL parsing security issues; use the WHATWG URL Standard, and polyfill URL if needed in unsupported environments.

    1.0.0release notes

  • Removed the task API.

    1.0.0release notes

  • Removed this API; replace it with URL, URLSearchParams, and custom code as needed.

    1.0.0release notes

  • Removed this URL parser to address URL parsing security issues; use the WHATWG URL Standard, and polyfill URL if needed in unsupported environments.

    1.0.0release notes

  • The supported Node.js version increased to 6.13.0 for URL support.

    1.0.0release notes

  • Fixed the name for OID 2.5.4.5 from serialName to serialNumber, which may affect applications that use the ID to name associations.

    1.0.0release notes

Security 25

  • Signature verification now rejects small-order public keys, preventing forged signatures that can verify under such keys.

    1.4.3release notessecurity advisory

  • Forge: TLS client crash on an unsupported ServerHello compression method

    1.4.3security advisory

  • Response header and cookie values are trimmed in linear time, preventing long whitespace-heavy headers from blocking clients.

    1.4.3release notessecurity advisory

  • A TLS client now ignores handshake messages received without a session instead of throwing a TypeError that could terminate the Node.js process.

    1.4.3release notessecurity advisory

  • Negative target values or moduli now exit early with zero instead of causing an infinite loop.

    1.4.1release notessecurity advisory

  • Forge: ASN.1 OID first arc truncation in asn1.oidToDer

    1.4.1security advisory

  • Forge: Certificate signature verified with the issuer's RSA signature scheme

    1.4.1security advisory

  • Forge: PKCS#12 MAC forgery and constant-key PBE via zero iteration count

    1.4.1security advisory

  • Forge: TLS client crash when the server sends no certificate

    1.4.1security advisory

  • Cookie handling now uses only own properties of the cookie store and ignores cookies named __proto__ or with the path __proto__.

    1.4.1release notessecurity advisory

  • PEM message matching and encapsulated-header parsing now run in linear time; BEGIN labels match the shortest label followed by the delimiter.

    1.4.1release notessecurity advisory

  • PKCS#12 MAC iteration counts below one are rejected, preventing MAC verification with a password-independent constant key.

    1.4.1release notes

  • Chain verification now uses only the RFC 5280 basicConstraints OID, preventing deprecated OIDs from overriding the genuine extension.

    1.4.1release notessecurity advisory

  • Trying certificates with the same subject as an issuer no longer modifies the CA store's certificate list.

    1.4.1release notessecurity advisory

  • Heartbeat requests received before the first handshake completes are ignored instead of answered, avoiding unauthenticated CPU-intensive responses.

    1.4.1release notes

  • Received TLS records are processed in a loop instead of recursively, preventing stack exhaustion when a chunk contains many records.

    1.4.1release notessecurity advisory

  • A record interrupting a fragmented handshake now fails the connection with an unexpected_message alert instead of throwing a TypeError.

    1.4.1release notessecurity advisory

  • Avoids an infinite loop and returns zero early when the target object value is <= 0.

    1.4.0release notessecurity advisory

  • Checks that the signature scalar S is less than L, rejecting forged non-canonical signatures.

    1.4.0release notessecurity advisory

  • Checks for absent basicConstraints on non-leaf certificates, preventing certificates without the required extensions from acting as CAs.

    1.4.0release notessecurity advisory

  • Rejects malformed DigestInfo sequences and signatures that do not have the required eight octets of padding, addressing signature forgery.

    1.4.0release notessecurity advisory

  • Adds a global configurable maximum ASN.1 parsing depth of 256 to prevent unbounded recursive parsing.

    1.3.2release notessecurity advisory

  • Fixes a PKCS#12 MAC verification bypass caused by missing macData enforcement and improper ASN.1 validation.

    1.3.2release notes

  • node-forge has an Interpretation Conflict vulnerability via its ASN.1 Validator Desynchronization

    1.3.2security advisory

  • Rejects parsed OID values larger than 2**32 - 1 and DER OID values larger than 2**53 - 1, preventing oversized arcs from truncating to smaller OIDs.

    1.3.2release notessecurity advisory

New APIs and options 6

  • The X.509 nameConstraints extension is parsed into permittedSubtrees, excludedSubtrees, and unsupportedSubtreeRange; invalid values remain unparsed.

    1.4.3release notes

  • Adds the requested pseudonym OID.

    1.4.0release notes

  • Adds a per-call maxDepth option to limit DER parsing recursion depth.

    1.3.2release notes

  • Added an OID for givenName.

    1.0.0release notes

  • Added an OID for surname.

    1.0.0release notes

  • Added an OID for title.

    1.0.0release notes

Fixes and other changes 4

  • Converts non-string input to a string again, avoiding a TypeError when decoding Buffer input.

    1.4.2release notes

  • The first OID subidentifier can now be multi-byte and is encoded in base 128, supporting OIDs such as 2.999.

    1.4.1release notes

  • Certificate signatures are verified using the padding scheme and parameters declared by the certificate's own signature algorithm.

    1.4.1release notes

  • Makes digestAlgorithm parameters optional to fix PKCS#12/PFX issues introduced in 1.3.2.

    1.3.3release notes