Every CVE Search/ Get API key

CVE-2021-42781

Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that...

5.3 MediumFix available

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

2.87%Up 1.8 points since Apr 19, 2022
90%50%10%1%

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 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CVSS 2.0
5.0 MediumAV: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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

Affected packages
PackageAffectedFixed
opensc
Azure Linux:2
before 0.22.0-1
0.22.0-1
opensc
Debian:12
before 0.22.0-1
0.22.0-1
opensc
Debian:13
before 0.22.0-1
0.22.0-1
opensc
Debian:14
before 0.22.0-1
0.22.0-1
opensc
Debian: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
opensc
Debian: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
opensc
Mageia:8
From an advisory covering 4 CVEs
before 0.22.0-1.mga8
0.22.0-1.mga8
opensc
openEuler:20.03-LTS-SP1
before 0.20.0-8.oe1
0.20.0-8.oe1
opensc
SUSE:HPE Helion OpenStack 8
From an advisory covering 4 CVEs
before 0.13.0-3.19.1
0.13.0-3.19.1
opensc
SUSE: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
Affected packages
PackageAffectedFixed
opensc
SUSE:OpenStack Cloud 9
From an advisory covering 4 CVEs
before 0.13.0-3.19.1
0.13.0-3.19.1
opensc
SUSE:OpenStack Cloud Crowbar 8
From an advisory covering 4 CVEs
before 0.13.0-3.19.1
0.13.0-3.19.1
opensc
SUSE:OpenStack Cloud Crowbar 9
From an advisory covering 4 CVEs
before 0.13.0-3.19.1
0.13.0-3.19.1
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE:Linux Enterprise Server 12 SP5
From an advisory covering 4 CVEs
before 0.13.0-3.19.1
0.13.0-3.19.1
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE: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
opensc
SUSE:Enterprise Storage 6
From an advisory covering 4 CVEs
before 0.19.0-150100.3.16.1
0.19.0-150100.3.16.1
opensc
openSUSE:Leap 15.3
From an advisory covering 4 CVEs
before 0.19.0-150100.3.16.1
0.19.0-150100.3.16.1
opensc
openSUSE:Tumbleweed
From an advisory covering 4 CVEs
before 0.22.0-1.1
0.22.0-1.1

History

History
RecordedChangedSources
affected, facts
first indexedCVE 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

Show 40 moreShow less
MoveEnter Open