cve.bz

CVE-2021-3505 Insufficient Entropy

5.5 mediumExploit referenceEPSS 0.4%Fix available

Medium (5.5). EPSS 0.4% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

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
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 35th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-331 Insufficient Entropy
OWASP Top 10
A04:2025 Cryptographic Failures
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-3505 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-3505?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-3505?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-3505 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
libtpms_project:libtpmsbefore 0.8.0
redhat:enterprise_linux8.0
fedoraproject:fedora33

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14libtpms0.8.0~dev1-1DEBIAN-CVE-2021-3505

From the distributions' data via OSV.dev: the Debian Security Tracker. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian.

Red Hat

Red Hat rates this Low.

Red Hat's statement

Versions of `libtpms` prior to 0.8.0 generate weaker than expected TPM 2 RSA keys due to the flawed key creation algorithm. Red Hat Enterprise Linux 8 Advanced Virtualization is therefore affected by this flaw, as it ships an older version of the package (0.7.x).

Red Hat's mitigation

There is no mitigation for this issue. Upgrading to a fixed release (0.8.0+) is necessary but not sufficient. The only way to fix it is to unseal all data, delete the old TPM state file, generate a new one with the fixed key generation algorithm, then reseal the data.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8 Advanced Virtualizationvirt:8.2/libtpmsFix deferred
Red Hat Enterprise Linux 8 Advanced Virtualizationvirt:8.3/libtpmsFix deferred
Red Hat Enterprise Linux 8 Advanced Virtualizationvirt:av/libtpmsFix deferred
Red Hat Enterprise Linux 9libtpmsNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-3505.

Attack patterns (CAPEC)

  • CAPEC-59 Session Credential Falsification through Prediction Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON