CVE-2021-42779
A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid.
A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid.
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
A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid.
- Record
CVE-2021-42779- 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-416
- Updated
- 2026-11-02
CVE List No score
A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid.
- Record
CVE-2021-42779- Weakness
- CWE-416
- Updated
- 2026-11-02
EUVDEUVD-2021-29735 No score
A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid.
- Record
EUVD-2021-29735- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-rcjw-9639-853h
5.3
A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid.
A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid.
- Record
GHSA-rcjw-9639-853h- 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-416
- Updated
- 2026-11-02
OSVAZL-9482
5.3
CVE-2021-42779 affecting package opensc for versions less than 0.22.0-1
A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid.
- Record
AZL-9482- 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
A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid.
- Record
CVE-2021-42779- 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-42779
5.3
A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid.
- Record
DEBIAN-CVE-2021-42779- 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
OSVUBUNTU-CVE-2021-42779
5.3
A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid.
- Record
UBUNTU-CVE-2021-42779- 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 |
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 |
openscSUSE:OpenStack Cloud 9 From an advisory covering 4 CVEs |
before 0.13.0-3.19.1 | 0.13.0-3.19.1 |
Show 28 moreShow less
| Package | Affected | Fixed |
|---|---|---|
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 |
openscUbuntu:Pro:16.04:LTS |
All versions, plus listed versions 0.15.0-1ubuntu10.15.0-1ubuntu1+esm10.15.0-1ubuntu1+esm20.15.0-1ubuntu1+esm3 |
None known |
openscUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 0.17.0-10.17.0-20.17.0-2build10.17.0-30.17.0-3ubuntu0.1~esm10.17.0-3ubuntu0.1~esm20.17.0-3ubuntu0.1~esm3 |
None known |
openscUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 0.19.0-20.20.0-10.20.0-20.20.0-30.20.0-3ubuntu0.1~esm10.20.0-3ubuntu0.1~esm20.20.0-3ubuntu0.1~esm30.20.0-3ubuntu0.1~esm4 |
None known |
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-42779 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.08%, the 81st percentile. Fixed in opensc 0.22.0-1.
References
bugs.chromium.org/p/oss-fuzz/issues/detail?id=28843
bugzilla.redhat.com/show_bug.cgi?id=2016086
github.com/OpenSC/OpenSC/commit/1db88374
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
Show 39 moreShow less
nvd.nist.gov/vuln/detail/CVE-2021-42779
github.com/advisories/GHSA-rcjw-9639-853h
security-tracker.debian.org/tracker/CVE-2021-42779
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
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
ubuntu.com/security/CVE-2021-42779
access.redhat.com/security/cve/CVE-2021-42779
cve.org/CVERecord?id=CVE-2021-42779