sm-crypto@0.3.8

sm-crypto

  • latest version

    0.5.7

  • latest non vulnerable version

  • first published

    8 years ago

  • latest version published

    1 months ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the sm-crypto 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
    • C
    Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

    sm-crypto is a sm-crypto

    Affected versions of this package are vulnerable to Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) through the generateKeyPairHex path in src/sm2/utils.js. An attacker can recover or predict SM2 private keys and signing nonces by causing a Node.js application to use the default key-generation or signing APIs, which draw randomness from jsbn’s SecureRandom seeded from Math.random() and wall-clock time in the Node runtime. This makes SM2 keys generated in Node.js guessable and enables signature forgery; any application that relies on the library’s default SM2 key or signature generation can expose private keys and lose message authenticity.

    How to fix Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)?

    Upgrade sm-crypto to version 0.5.0 or higher.

    <0.5.0
    • H
    Improper Verification of Cryptographic Signature

    sm-crypto is a sm-crypto

    Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature in the SM2 signature verification process. An attacker can bypass signature validation by forging signatures for arbitrary public keys.

    How to fix Improper Verification of Cryptographic Signature?

    Upgrade sm-crypto to version 0.4.0 or higher.

    <0.4.0
    • C
    Insufficient Verification of Data Authenticity

    sm-crypto is a sm-crypto

    Affected versions of this package are vulnerable to Insufficient Verification of Data Authenticity in the SM2 decryption logic. An attacker can recover sensitive private key material by repeatedly interacting with the decryption interface.

    How to fix Insufficient Verification of Data Authenticity?

    Upgrade sm-crypto to version 0.3.14 or higher.

    <0.3.14
    • H
    Improper Verification of Cryptographic Signature

    sm-crypto is a sm-crypto

    Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature via the SM2 signature verification process. An attacker can create a new valid signature for a previously signed message by manipulating an existing signature.

    How to fix Improper Verification of Cryptographic Signature?

    Upgrade sm-crypto to version 0.3.14 or higher.

    <0.3.14