Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-3505

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-3505
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 10:19 UTC · Revision 1

Source evidence

CVE-2021-3505

core-osv · Original source

Published 19 Apr 2021, 21:15 UTC

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.

osv:CVE-2021-3505
Complete source record
{
  "id": "24b44f710972aa800cb1552983e0a764dfa3004f6e12918358cbb461866203b6",
  "url": "https://osv.dev/vulnerability/CVE-2021-3505",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-3505",
    "summary": "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.",
    "evidence": "osv:CVE-2021-3505",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-3505",
      "aliases": [
        "CVE-2021-3505"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/stefanberger/libtpms",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3fd4b94903061e156e64dc6a738237df2aebba09"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:libtpms_project:libtpms:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.8.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.7.0",
            "v0.6.0",
            "v0.5.2.1",
            "v0.5.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-3505.json"
          }
        }
      ],
      "modified": "2026-10-20T10:50:08.603195842Z",
      "provider": "osv",
      "references": [
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NUCZX4S53TUNTSGTCRDNOQZV2V2RI4RJ/",
        "https://bugzilla.redhat.com/show_bug.cgi?id=1950046",
        "https://github.com/stefanberger/libtpms/issues/183"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*"
            ],
            "vendor_product": "fedoraproject:fedora",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "33"
                  },
                  {
                    "last_affected": "33"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:advanced_virtualization:*:*:*"
            ],
            "vendor_product": "redhat:enterprise_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "8.0"
                  },
                  {
                    "last_affected": "8.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-3505",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 381338,
  "published_at": "2021-04-19T21:15:13.27+00:00"
}