Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2023-2977

A vulnerbility was found in OpenSC. This security flaw cause a buffer overrun vulnerability in pkcs15 cardos_have_verifyrc_package. The attacker can supply a smart card package with malformed ASN1 context. The cardos_have_verifyrc_package function scans the ASN1 buffer for 2 tags, where remaining length is wrongly caculated due to moved starting pointer. This leads to possible heap-based buffer oob read. In cases where ASAN is enabled while compiling this causes a crash. Further info leak or more damage is possible.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-2977
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 01:18 UTC · Revision 1

Source evidence

CVE-2023-2977

core-osv · Original source

Published 1 Jun 2023, 00:00 UTC

A vulnerbility was found in OpenSC. This security flaw cause a buffer overrun vulnerability in pkcs15 cardos_have_verifyrc_package. The attacker can supply a smart card package with malformed ASN1 context. The cardos_have_verifyrc_package function scans the ASN1 buffer for 2 tags, where remaining length is wrongly caculated due to moved starting pointer. This leads to possible heap-based buffer oob read. In cases where ASAN is enabled while compiling this causes a crash. Further info leak or more damage is possible.

osv:CVE-2023-2977
Complete source record
{
  "id": "6384796ef90fb7b659e01d40c0813695ad0af840308a21c44cfae92e872cc4a5",
  "url": "https://osv.dev/vulnerability/CVE-2023-2977",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2023-2977",
    "summary": "A vulnerbility was found in OpenSC. This security flaw cause a buffer overrun vulnerability in pkcs15 cardos_have_verifyrc_package. The attacker can supply a smart card package with malformed ASN1 context. The cardos_have_verifyrc_package function scans the ASN1 buffer for 2 tags, where remaining length is wrongly caculated due to moved starting pointer. This leads to possible heap-based buffer oob read. In cases where ASAN is enabled while compiling this causes a crash. Further info leak or more damage is possible.",
    "evidence": "osv:CVE-2023-2977",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2023-2977",
      "aliases": [
        "CVE-2023-2977"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/opensc/opensc",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5497519ea6b4af596628f8f8f2f904bacaa3148f"
                },
                {
                  "last_affected": "5497519ea6b4af596628f8f8f2f904bacaa3148f"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "opensc-0.23.0"
                      },
                      {
                        "last_affected": "opensc-0.23.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandaloneSingleVersion"
                  },
                  {
                    "cpe": "cpe:2.3:a:opensc_project:opensc:0.23.0:-:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0.23.0-NA"
                      },
                      {
                        "last_affected": "0.23.0-NA"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "0.23.0-NA",
            "opensc-0.23.0",
            "0.23.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-2977.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:48.645848476Z",
      "provider": "osv",
      "references": [
        "https://access.redhat.com/security/cve/CVE-2023-2977",
        "https://lists.debian.org/debian-lts-announce/2024/12/msg00026.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/2xxx/CVE-2023-2977.json",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FJD4Q4AJSGE5UIJI7OUYZY4HGGCVYQNI/",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LAR54OV6EHA56B4XJF6RNPQ4HJ2ITU66/",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-2977",
        "https://bugzilla.redhat.com/show_bug.cgi?id=2211088",
        "https://github.com/OpenSC/OpenSC/issues/2785",
        "https://github.com/OpenSC/OpenSC/pull/2787",
        "https://lists.debian.org/debian-lts-announce/2023/06/msg00025.html"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-119"
        ],
        "cna_assigner": "redhat",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/2xxx/CVE-2023-2977.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-2977",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 516919,
  "published_at": "2023-06-01T00:00:00+00:00"
}