Junglewise Threat Intelligence

CVE-2020-14968: jsrsasign RSA-PSS signature validation bypass via prepended zeros

CVE-2020-14968 · Severity: low · CVSS 3.1 · Published 2020-06-26

Technologies: jsrsasign (npm). Vendors: npm.

Executive brief

jsrsasign is a JavaScript library for cryptographic operations including RSA digital signature verification. The library incorrectly accepts RSA-PSS signatures with leading zero bytes as valid, allowing an attacker to forge signatures on messages. This could compromise the integrity of applications relying on jsrsasign for signature validation, such as token verification systems or document signing applications.

Technical details

The vulnerability is a cryptographic signature validation weakness in jsrsasign's RSA-PSS implementation. The library converts signatures to BigInteger and fails to enforce strict encoding rules, accepting signatures with unnecessary prepending zeros that should be rejected per RFC 8017. An attacker with knowledge of a valid RSA-PSS signature can craft a forged variant with prepended zeros that the library will incorrectly validate as authentic. The attack requires no authentication or special privileges, only network access to an application using vulnerable jsrsasign for RSA-PSS verification. The vulnerability is limited to applications explicitly using RSA-PSS signature validation; other cryptographic operations are unaffected. Patch 8.0.17 and later versions include fixes.

Affected products

  • kjur jsrsasign 3.0.0 to 8.0.16

Timeline

  • 2020-06-22: disclosed
  • 2020-06-23: patched: Version 8.0.17 released
  • 2020-06-26: advisory

References

Related threats