CVE-2021-42781
Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that...
Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that could potentially crash programs using the library.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Exploit likelihood
What each source reports
NVD Score used
5.3
Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that could potentially crash programs using the library.
- Record
CVE-2021-42781- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:N/I:N/A:P - Weakness
- CWE-119, CWE-787
- Updated
- 2026-11-02
CVE List No score
Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that could potentially crash programs using the library.
- Record
CVE-2021-42781- Weakness
- CWE-119
- Updated
- 2026-11-02
EUVDEUVD-2021-29737 No score
Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that could potentially crash programs using the library.
- Record
EUVD-2021-29737- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-93j9-4rqq-x6gr
5.3
Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that...
Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that could potentially crash programs using the library.
- Record
GHSA-93j9-4rqq-x6gr- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Weakness
- CWE-119, CWE-787
- Updated
- 2026-11-02
OSVAZL-9484
5.3
CVE-2021-42781 affecting package opensc for versions less than 0.22.0-1
Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that could potentially crash programs using the library.
- Record
AZL-9484- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
OSV
5.3
Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that could potentially crash programs using the library.
- Record
CVE-2021-42781- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
Show 7 moreShow less
OSVDEBIAN-CVE-2021-42781
5.3
Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that could potentially crash programs using the library.
- Record
DEBIAN-CVE-2021-42781- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
OSVOESA-2022-1640
5.3
opensc security update
OpenSC provides a set of libraries and utilities to work with smart cards.Its main focus is on cards that support cryptographic operations, and facilitate their use in security applications such as authentication, mail encryption and digital signatures. OpenSC implements the standard APIs to smart cards, e.g. PKCS#11 API, Windows’ Smart Card Minidriver and macOS Tokend.
Security Fix(es): Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that could potentially crash programs using the library.(CVE-2021-42781)
- Record
OESA-2022-1640- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
OSVMGASA-2021-0512 No score
Updated opensc packages fix security vulnerability
CVE-2021-42780: Fixed use after return in insert_pin() (bsc#1192005). CVE-2021-42779: Fixed use after free in sc_file_valid() (bsc#1191992). CVE-2021-42781: Fixed multiple heap buffer overflows in pkcs15-oberthur.c (bsc#1192000). CVE-2021-42782: Stack buffer overflow issues in various places (bsc#1191957).
- Record
MGASA-2021-0512- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11613-1 No score
opensc-0.22.0-2.1 on GA media
These are all security issues fixed in the opensc-0.22.0-2.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11613-1- Updated
- 2026-11-02
OSVSUSE-SU-2021:3582-1 No score
Security update for opensc
This update for opensc fixes the following issues:
- CVE-2021-42780: Fixed use after return in insert_pin() (bsc#1192005).
- CVE-2021-42779: Fixed use after free in sc_file_valid() (bsc#1191992).
- CVE-2021-42781: Fixed multiple heap buffer overflows in pkcs15-oberthur.c (bsc#1192000).
- CVE-2021-42782: Stack buffer overflow issues in various places (bsc#1191957).
- Record
SUSE-SU-2021:3582-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:1041-1 No score
Security update for opensc
This update for opensc fixes the following issues:
Security issues fixed:
- CVE-2021-42780: Fixed use after return in insert_pin() (bsc#1192005).
- CVE-2021-42779: Fixed use after free in sc_file_valid() (bsc#1191992).
- CVE-2021-42781: Fixed multiple heap buffer overflows in pkcs15-oberthur.c (bsc#1192000).
- CVE-2021-42782: Stack buffer overflow issues in various places (bsc#1191957).
- CVE-2019-6502: Fixed a memory leak in sc_context_create() (bsc#1122756).
- CVE-2020-26570: Fixed a heap based buffer overflow in sc_oberthur_read_file (bsc#1177364).
- CVE-2020-26572: Prevent out of bounds write (bsc#1177378)
- CVE-2020-26571: gemsafe GPK smart card software driver stack-based buffer overflow (bsc#1177380)
- CVE-2019-15946: out-of-bounds access of an ASN.1 Octet string in asn1_decode_entry (bsc#1149747)
- CVE-2019-19479: incorrect read operation during parsing of a SETCOS file attribute (bsc#1158256)
- CVE-2019-15945: Fixed an out-of-bounds access of an ASN.1 Bitstring in decode_bit_string (bsc#1149746).
- CVE-2019-19481: Fixed an improper handling of buffer limits for CAC certificates (bsc#1158305).
- CVE-2019-20792: Fixed a double free in coolkey_free_private_data (bsc#1170809).
Non-security issues fixed:
- Fixes segmentation fault in 'pkcs11-tool.c'. (bsc#1114649)
- Record
SUSE-SU-2022:1041-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:1156-1 No score
Security update for opensc
This update for opensc fixes the following issues:
Security issues fixed:
- CVE-2021-42782: Stack buffer overflow issues in various places (bsc#1191957).
- CVE-2021-42781: Fixed multiple heap buffer overflows in pkcs15-oberthur.c (bsc#1192000).
- CVE-2021-42780: Fixed use after return in insert_pin() (bsc#1192005).
- CVE-2021-42779: Fixed use after free in sc_file_valid() (bsc#1191992).
Non-security issues fixed:
- Fixes segmentation fault in 'pkcs11-tool.c'. (bsc#1114649)
- Record
SUSE-SU-2022:1156-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
openscAzure Linux:2 |
before 0.22.0-1 | 0.22.0-1 |
openscDebian:12 |
before 0.22.0-1 | 0.22.0-1 |
openscDebian:13 |
before 0.22.0-1 | 0.22.0-1 |
openscDebian:14 |
before 0.22.0-1 | 0.22.0-1 |
openscDebian:10 From an advisory covering 6 CVEs |
before 0.19.0-1+deb10u2, plus listed versions 0.19.0-10.19.0-1+deb10u1 |
0.19.0-1+deb10u2 |
openscDebian:11 From an advisory covering 18 CVEs |
before 0.21.0-1+deb11u1, plus listed versions 0.21.0-1 |
0.21.0-1+deb11u1 |
openscMageia:8 From an advisory covering 4 CVEs |
before 0.22.0-1.mga8 | 0.22.0-1.mga8 |
openscopenEuler:20.03-LTS-SP1 |
before 0.20.0-8.oe1 | 0.20.0-8.oe1 |
openscSUSE:HPE Helion OpenStack 8 From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
openscSUSE:OpenStack Cloud 8 From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
Show 26 moreShow less
| Package | Affected | Fixed |
|---|---|---|
openscSUSE:OpenStack Cloud 9 From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
openscSUSE:OpenStack Cloud Crowbar 8 From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
openscSUSE:OpenStack Cloud Crowbar 9 From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
openscSUSE:Linux Enterprise Server for SAP Applications 12 SP3 From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
openscSUSE:Linux Enterprise Server for SAP Applications 12 SP4 From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
openscSUSE:Linux Enterprise Server 12 SP2-BCL From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
openscSUSE:Linux Enterprise Server 12 SP3-LTSS From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
openscSUSE:Linux Enterprise Server 12 SP3-BCL From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
openscSUSE:Linux Enterprise Server 12 SP4-LTSS From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
openscSUSE:Linux Enterprise Server 12 SP5 From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
openscSUSE:Linux Enterprise Server for SAP Applications 12 SP5 From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
openscSUSE:Linux Enterprise High Performance Computing 15-ESPOS From an advisory covering 13 CVEs |
before 0.18.0-150000.3.23.1 | 0.18.0-150000.3.23.1 |
openscSUSE:Linux Enterprise High Performance Computing 15-LTSS From an advisory covering 13 CVEs |
before 0.18.0-150000.3.23.1 | 0.18.0-150000.3.23.1 |
openscSUSE:Linux Enterprise Server 15-LTSS From an advisory covering 13 CVEs |
before 0.18.0-150000.3.23.1 | 0.18.0-150000.3.23.1 |
openscSUSE:Linux Enterprise Server for SAP Applications 15 From an advisory covering 13 CVEs |
before 0.18.0-150000.3.23.1 | 0.18.0-150000.3.23.1 |
openscSUSE:Linux Enterprise Module for Basesystem 15 SP3 From an advisory covering 4 CVEs |
before 0.19.0-150100.3.16.1 | 0.19.0-150100.3.16.1 |
openscSUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS From an advisory covering 4 CVEs |
before 0.19.0-150100.3.16.1 | 0.19.0-150100.3.16.1 |
openscSUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS From an advisory covering 4 CVEs |
before 0.19.0-150100.3.16.1 | 0.19.0-150100.3.16.1 |
openscSUSE:Linux Enterprise Real Time 15 SP2 From an advisory covering 4 CVEs |
before 0.19.0-150100.3.16.1 | 0.19.0-150100.3.16.1 |
openscSUSE:Linux Enterprise Server 15 SP1-BCL From an advisory covering 4 CVEs |
before 0.19.0-150100.3.16.1 | 0.19.0-150100.3.16.1 |
openscSUSE:Linux Enterprise Server 15 SP1-LTSS From an advisory covering 4 CVEs |
before 0.19.0-150100.3.16.1 | 0.19.0-150100.3.16.1 |
openscSUSE:Linux Enterprise Server for SAP Applications 15 SP1 From an advisory covering 4 CVEs |
before 0.19.0-150100.3.16.1 | 0.19.0-150100.3.16.1 |
openscSUSE:Linux Enterprise Micro 5.1 From an advisory covering 4 CVEs |
before 0.19.0-150100.3.16.1 | 0.19.0-150100.3.16.1 |
openscSUSE:Enterprise Storage 6 From an advisory covering 4 CVEs |
before 0.19.0-150100.3.16.1 | 0.19.0-150100.3.16.1 |
openscopenSUSE:Leap 15.3 From an advisory covering 4 CVEs |
before 0.19.0-150100.3.16.1 | 0.19.0-150100.3.16.1 |
openscopenSUSE:Tumbleweed From an advisory covering 4 CVEs |
before 0.22.0-1.1 | 0.22.0-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-42781 is a medium vulnerability (CVSS 5.3) in Opensc, published October 29, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.87%, the 86th percentile. Fixed in opensc 0.22.0-1.
References
bugzilla.redhat.com/show_bug.cgi?id=2016439
github.com/OpenSC/OpenSC/commit/17d8980c
github.com/OpenSC/OpenSC/commit/40c50a3a
github.com/OpenSC/OpenSC/commit/05648b06
github.com/OpenSC/OpenSC/commit/5d4daf6c
github.com/OpenSC/OpenSC/commit/cae5c71f
Show 40 moreShow less
security.gentoo.org/glsa/202209-03
lists.debian.org/debian-lts-announce/2023/06/msg00025.html
lists.debian.org/debian-lts-announce/2024/12/msg00026.html
nvd.nist.gov/vuln/detail/CVE-2021-42781
github.com/advisories/GHSA-93j9-4rqq-x6gr
security-tracker.debian.org/tracker/CVE-2021-42781
advisories.mageia.org/MGASA-2021-0512.html
bugs.mageia.org/show_bug.cgi?id=29607
lists.suse.com/pipermail/sle-security-updates/2021-October/009683.html
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1640
suse.com/support/update/announcement/2021/suse-su-20213582-1
bugzilla.suse.com/1191957
bugzilla.suse.com/1191992
bugzilla.suse.com/1192000
bugzilla.suse.com/1192005
suse.com/security/cve/CVE-2021-42779
suse.com/security/cve/CVE-2021-42780
suse.com/security/cve/CVE-2021-42781
suse.com/security/cve/CVE-2021-42782
suse.com/support/update/announcement/2022/suse-su-20221041-1
bugzilla.suse.com/1114649
bugzilla.suse.com/1122756
bugzilla.suse.com/1149746
bugzilla.suse.com/1149747
bugzilla.suse.com/1158256
bugzilla.suse.com/1158305
bugzilla.suse.com/1170809
bugzilla.suse.com/1177364
bugzilla.suse.com/1177378
bugzilla.suse.com/1177380
suse.com/security/cve/CVE-2019-15945
suse.com/security/cve/CVE-2019-15946
suse.com/security/cve/CVE-2019-19479
suse.com/security/cve/CVE-2019-19481
suse.com/security/cve/CVE-2019-20792
suse.com/security/cve/CVE-2019-6502
suse.com/security/cve/CVE-2020-26570
suse.com/security/cve/CVE-2020-26571
suse.com/security/cve/CVE-2020-26572
suse.com/support/update/announcement/2022/suse-su-20221156-1