node-forge@1.3.1

JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

  • latest version

    1.4.0

  • first published

    13 years ago

  • latest version published

    5 months ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the node-forge package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Improper Verification of Cryptographic Signature

    node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

    Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature in rsa.js, whose DigestInfo validation checks the outer element count (obj.value.length !== 2) but never verifies the element count of the inner DigestAlgorithm SEQUENCE, so the ASN.1 parser accepts extra children that are ignored during digest extraction. An attacker can forge a signature that verifies as valid for an arbitrary message, without the private key, by fixing the target digest at the block boundaries and filling roughly 314 garbage bytes inside the DigestAlgorithm structure to absorb the mathematical residue. This only affects verification against RSA keys with a low public exponent such as e=3, and although _parseAllDigestBytes defaults to true and rejects trailing garbage, it does not detect this interior padding.

    Note: This is a bypass of the fix for the vulnerability described in CVE-2026-33894 and, as of this publication, has not been acknowledged by project maintainers.

    How to fix Improper Verification of Cryptographic Signature?

    A fix was pushed into the master branch but not yet published.

    *
    • H
    Improper Verification of Cryptographic Signature

    node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

    Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature in ASN.1 structures during RSA signature verification. An attacker can bypass signature verification and inject forged signatures by crafting ASN.1 data with extra fields or insufficient padding, allowing unauthorized actions or data integrity violations.

    Note:

    This is only exploitable if the default verification scheme (RSASSA-PKCS1-v1_5) is used with the _parseAllDigestBytes: true setting (which is the default).

    How to fix Improper Verification of Cryptographic Signature?

    Upgrade node-forge to version 1.4.0 or higher.

    <1.4.0
    • C
    Improper Certificate Validation

    node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

    Affected versions of this package are vulnerable to Improper Certificate Validation in the verifyCertificateChain function. An attacker can gain unauthorized certificate authority capabilities by presenting a certificate chain where an intermediate certificate lacks both basicConstraints and keyUsage extensions, allowing the attacker to sign certificates for arbitrary domains and have them accepted as valid.

    How to fix Improper Certificate Validation?

    Upgrade node-forge to version 1.4.0 or higher.

    <1.4.0
    • H
    Infinite loop

    node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

    Affected versions of this package are vulnerable to Infinite loop via the modInverse function. An attacker can cause the application to hang indefinitely and consume excessive CPU resources by supplying a zero value as input, resulting in an infinite loop.

    How to fix Infinite loop?

    Upgrade node-forge to version 1.4.0 or higher.

    <1.4.0
    • H
    Improper Verification of Cryptographic Signature

    node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

    Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature in the ed25519.verify function. An attacker can bypass authentication and authorization logic by submitting forged non-canonical signatures where the scalar S is not properly validated, allowing acceptance of signatures that should be rejected according to the specification.

    How to fix Improper Verification of Cryptographic Signature?

    Upgrade node-forge to version 1.4.0 or higher.

    <1.4.0
    • H
    Uncontrolled Recursion

    node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

    Affected versions of this package are vulnerable to Uncontrolled Recursion via the fromDer function in asn1.js, which lacks recursion depth. An attacker can cause stack exhaustion and disrupt service availability by submitting specially crafted, deeply nested DER-encoded ASN.1 data.

    How to fix Uncontrolled Recursion?

    Upgrade node-forge to version 1.3.2 or higher.

    <1.3.2
    • M
    Integer Overflow or Wraparound

    node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

    Affected versions of this package are vulnerable to Integer Overflow or Wraparound via the derToOid function in the asn1.js file, which decodes ASN.1 structures containing OIDs with oversized arcs. An attacker can bypass security decisions based on OID validation by crafting malicious ASN.1 data that exploits 32-bit bitwise truncation.

    How to fix Integer Overflow or Wraparound?

    Upgrade node-forge to version 1.3.2 or higher.

    <1.3.2
    • C
    Interpretation Conflict

    node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

    Affected versions of this package are vulnerable to Interpretation Conflict via the asn1.validate() function. An attacker can cause schema validation to become desynchronized, resulting in semantic divergence that may allow bypassing cryptographic verifications and security decisions, by passing in ASN.1 data with optional parameters that may be interpreted as object boundaries.

    How to fix Interpretation Conflict?

    Upgrade node-forge to version 1.3.2 or higher.

    <1.3.2