# CVE-2021-3505: A flaw was found in libtpms in versions before 0.8.0.

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.40%, higher than 36% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-04-19T20:22:05.000Z
- Modified: 2026-06-17T04:05:15.063Z
- Weaknesses: CWE-331
- Assigned by: redhat

## Description

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.

(As written by CVE List.)

## Affected

- libtpms: libtpms 0.8.0
- libtpms_project libtpms: before 0.8.0
- redhat enterprise_linux: 8.0
- fedoraproject fedora: 33

## Every score

- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:2.0 2.1 Low `AV:L/AC:L/Au:N/C:P/I:N/A:N`

## References

- <https://github.com/stefanberger/libtpms/issues/183> (exploit, patch, third-party-advisory)
- <https://bugzilla.redhat.com/show_bug.cgi?id=1950046> (issue-tracking, patch, third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NUCZX4S53TUNTSGTCRDNOQZV2V2RI4RJ/> (vendor-advisory)

## Sources

- CVE List: [CVE-2021-3505](https://www.cve.org/CVERecord?id=CVE-2021-3505), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-3505](https://nvd.nist.gov/vuln/detail/CVE-2021-3505), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-3505 · Whole record: https://cve.day/CVE-2021-3505.json · Rebuilt by cve.day 2026-11-25T22:58:00.863Z
