Insecure Randomness Affecting stefanberger/libtpms package, versions [,0.8.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.06% (27th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Insecure Randomness vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-STEFANBERGERLIBTPMS-2366730
  • published26 Jan 2022
  • disclosed19 Apr 2021
  • creditUnknown

Introduced: 19 Apr 2021

CVE-2021-3505  (opens in a new tab)
CWE-331  (opens in a new tab)

How to fix?

Upgrade stefanberger/libtpms to version 0.8.0 or higher.

Overview

Affected versions of this package are vulnerable to Insecure Randomness. A flaw was found in libtpms in versions before 0.8.0. The TPM 2 implementation returns 2048 bit keys with ~1984 bit strength due to a bug in the TCG specification. The bug is in the key creation algorithm in RsaAdjustPrimeCandidate(), which is called before the prime number check. The highest threat from this vulnerability is to data confidentiality.

References

CVSS Scores

version 3.1