# CVE-2023-2977: opensc: A vulnerbility was found in OpenSC

CVE-2023-2977 is fixed in 4 products on 1 platform, first by DEBIAN-CVE-2023-2977, released June 1, 2023. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2023-2977
- Priority: High
- CVSS: 7.1 (high)
- EPSS: 0.0029
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: May 31, 2023

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | opensc Debian 12.15 (bookworm) | 0.23.0-0.3 | [DEBIAN-CVE-2023-2977](https://patchblox.com/security/data/fix/linux/debian-cve-2023-2977.md) | Jun 1, 2023 |
| Linux | opensc Debian 13.5 (trixie) | 0.23.0-0.3 | [DEBIAN-CVE-2023-2977](https://patchblox.com/security/data/fix/linux/debian-cve-2023-2977.md) | Jun 1, 2023 |
| Linux | opensc Debian 14 | 0.23.0-0.3 | [DEBIAN-CVE-2023-2977](https://patchblox.com/security/data/fix/linux/debian-cve-2023-2977.md) | Jun 1, 2023 |
| Linux | opensc RHEL 8 | 0:0.20.0-6.el8 | [RHSA-2023:7160](https://patchblox.com/security/data/fix/linux/rhsa-2023-7160.md) | Nov 14, 2023 |
| Linux | opensc RHEL 9 | 0:0.23.0-2.el9 | [RHSA-2023:6587](https://patchblox.com/security/data/fix/linux/rhsa-2023-6587.md) | Nov 7, 2023 |
| Linux | opensc Ubuntu 18.04.6 LTS (bionic) | 0.17.0-3ubuntu0.1~esm2 | [opensc 0.17.0-3ubuntu0.1~esm2](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-opensc-0.17.0-3ubuntu0.1-esm2.md) | Sep 3, 2024 |
| Linux | opensc Ubuntu 20.04 LTS (focal) | 0.20.0-3ubuntu0.1~esm4 | [opensc 0.20.0-3ubuntu0.1~esm4](https://patchblox.com/security/data/fix/linux/ubuntu-focal-opensc-0.20.0-3ubuntu0.1-esm4.md) | Sep 10, 2024 |
| Linux | opensc Ubuntu 22.04.1 LTS (jammy) | 0.22.0-1ubuntu2+esm1 | [opensc 0.22.0-1ubuntu2+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-opensc-0.22.0-1ubuntu2-esm1.md) | Sep 10, 2024 |
| Linux | opensc almalinux 8 | 0.20.0-6.el8 | [ALSA-2023:7160](https://patchblox.com/security/data/fix/linux/alsa-2023-7160.md) | Nov 14, 2023 |
| Linux | opensc almalinux 9 | 0.23.0-2.el9 | [ALSA-2023:6587](https://patchblox.com/security/data/fix/linux/alsa-2023-6587.md) | Nov 7, 2023 |
| Linux | opensc amzn 2023 | 0.23.0-3.amzn2023.0.1 | [ALAS2023-2023-207](https://patchblox.com/security/data/fix/linux/alas2023-2023-207.md) | Jun 7, 2023 |
| Linux | opensc ol 8 | 0:0.20.0-6.el8 | [ELSA-2023-7160](https://patchblox.com/security/data/fix/linux/elsa-2023-7160.md) | Nov 17, 2023 |
| Linux | opensc ol 9 | 0:0.23.0-2.el9 | [ELSA-2023-6587](https://patchblox.com/security/data/fix/linux/elsa-2023-6587.md) | Nov 11, 2023 |
| Linux | opensc-debuginfo amzn 2023 | 0.23.0-3.amzn2023.0.1 | [ALAS2023-2023-207](https://patchblox.com/security/data/fix/linux/alas2023-2023-207.md) | Jun 7, 2023 |
| Linux | opensc-debugsource amzn 2023 | 0.23.0-3.amzn2023.0.1 | [ALAS2023-2023-207](https://patchblox.com/security/data/fix/linux/alas2023-2023-207.md) | Jun 7, 2023 |
| Linux | opensc-pkcs11 Ubuntu 18.04.6 LTS (bionic) | 0.17.0-3ubuntu0.1~esm2 | [opensc-pkcs11 0.17.0-3ubuntu0.1~esm2](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-opensc-pkcs11-0.17.0-3ubuntu0.1-esm2.md) | Sep 3, 2024 |
| Linux | opensc-pkcs11 Ubuntu 20.04 LTS (focal) | 0.20.0-3ubuntu0.1~esm4 | [opensc-pkcs11 0.20.0-3ubuntu0.1~esm4](https://patchblox.com/security/data/fix/linux/ubuntu-focal-opensc-pkcs11-0.20.0-3ubuntu0.1-esm4.md) | Sep 10, 2024 |
| Linux | opensc-pkcs11 Ubuntu 22.04.1 LTS (jammy) | 0.22.0-1ubuntu2+esm1 | [opensc-pkcs11 0.22.0-1ubuntu2+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-opensc-pkcs11-0.22.0-1ubuntu2-esm1.md) | Sep 10, 2024 |

---

Data as of 2026-11-08T00:53:09Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
