Vulnerability · Published Jun 1, 2023 · Assigned by redhat

CVE-2023-2977

High 7.1

In plain English

A high-severity memory corruption in OpenSC. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 22% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.1High
Exploit odds (30 days)0.3%top 78.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8opensc0.20.0-6.el8ALSA-2023:7160
AlmaLinux:9opensc0.23.0-2.el9ALSA-2023:6587
Debian:12opensc0.23.0-0.3DEBIAN-CVE-2023-2977
Debian:13opensc0.23.0-0.3DEBIAN-CVE-2023-2977
Debian:14opensc0.23.0-0.3DEBIAN-CVE-2023-2977

Affected products (as reported)

VendorProductVersions
n/a OpenSC opensc-0.23.0

Weakness: CWE-119 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

References