CVE-2023-2977: Buffer Overflow

Published May 30, 2023
·
Updated

A vulnerability was found in OpenSC. This issue causes a buffer overrun in the pkcs15 cardoshaveverifyrcpackage. This flaw allows an attacker to supply a smart card package with a malformed ASN1 context. The cardoshaveverifyrcpackage function scans the ASN1 buffer for two tags, where the remaining length is wrongly calculated due to a moved starting pointer, leading to a possible heap-based buffer out-of-bounds read. In cases where ASN is enabled while compiling, this problem causes a crash, and further information leaks or more damage is likely.

Other sources

A vulnerbility was found in OpenSC. This security flaw cause a buffer overrun vulnerability in pkcs15 cardoshaveverifyrcpackage. The attacker can supply a smart card package with malformed ASN1 context. The cardoshaveverifyrcpackage 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.

Buffer overrun vulnerability in pkcs15 cardoshaveverifyrcpackage https://github.com/OpenSC/OpenSC/issues/2785

Red Hat

Affected Software

4 affected componentsFixes available
Opensc Project Opensc=0.23.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
debian/opensc<=0.21.0-1
0.21.0-1+deb11u10.23.0-0.3+deb12u20.26.1-1

Event History

May 30, 2023
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityWeakness
Data Sourced
via Red Hat·01:28 PM
DescriptionSeverityAffected Software
Jun 1, 2023
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Data Sourced
via NVD·01:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Mar 12, 2025
Data Sourced
via Launchpad·09:39 AM
Description
Apr 10, 2025
Data Sourced
via Ubuntu·03:08 AM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID for this OpenSC vulnerability?

The vulnerability ID for this OpenSC vulnerability is CVE-2023-2977.

2

What is the severity of CVE-2023-2977?

CVE-2023-2977 has a severity rating of 7.1 (high).

3

What is the impact of the buffer overrun vulnerability in pkcs15 cardos_have_verifyrc_package?

The buffer overrun vulnerability in pkcs15 cardos_have_verifyrc_package allows an attacker to supply a smart card package with a malformed ASN1 context, potentially leading to arbitrary code execution or a denial of service.

4

Which versions of OpenSC are affected by CVE-2023-2977?

OpenSC version 0.23.0 is affected by CVE-2023-2977.

5

How can I fix the CVE-2023-2977 vulnerability in OpenSC?

To fix the CVE-2023-2977 vulnerability in OpenSC, update to a version that includes the fix provided in the OpenSC GitHub repository pull request.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203