CVE-2021-42782
published 2022-04-18CVE-2021-42782: Stack buffer overflow issues were found in Opensc before version 0.22.0 in various places that could potentially crash programs using the library.
PriorityP426medium5.3CVSS 3.1
AVNACLPRNUINSUCNINAL
EPSS
2.67%
84.1th percentile
Stack buffer overflow issues were found in Opensc before version 0.22.0 in various places that could potentially crash programs using the library.
Affected
18 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | opensc | < opensc 0.22.0-1 (bookworm) | opensc 0.22.0-1 (bookworm) |
| fedoraproject | fedora | — | — |
| msrc | cbl2_opensc_0.22.0-1_on_cbl_mariner_2.0 | — | — |
| opensc_project | opensc | < 0.22.0 | 0.22.0 |
| opensc_project | opensc | — | — |
| opensc_project | opensc | >= 0 < 0.21.0-1+deb11u1 | 0.21.0-1+deb11u1 |
| opensc_project | opensc | >= 0 < 0.22.0-1 | 0.22.0-1 |
| opensc_project | opensc | >= 0 < 0.22.0-1 | 0.22.0-1 |
| opensc_project | opensc | >= 0 < 0.22.0-1 | 0.22.0-1 |
| opensc_project | opensc | >= 0 < 0.15.0-1ubuntu1+esm3 | 0.15.0-1ubuntu1+esm3 |
| opensc_project | opensc | >= 0 < 0.15.0-1ubuntu1+esm2 | 0.15.0-1ubuntu1+esm2 |
| opensc_project | opensc | >= 0 < 0.17.0-3ubuntu0.1~esm3 | 0.17.0-3ubuntu0.1~esm3 |
| opensc_project | opensc | >= 0 < 0.17.0-3ubuntu0.1~esm2 | 0.17.0-3ubuntu0.1~esm2 |
| opensc_project | opensc | >= 0 < 0.20.0-3ubuntu0.1~esm3 | 0.20.0-3ubuntu0.1~esm3 |
| opensc_project | opensc | >= 0 < 0.20.0-3ubuntu0.1~esm4 | 0.20.0-3ubuntu0.1~esm4 |
| opensc_project | opensc | >= 0 < 0.20.0-3ubuntu0.1~esm2 | 0.20.0-3ubuntu0.1~esm2 |
| opensc_project | opensc | >= 0 < 0.22.0-1ubuntu2+esm1 | 0.22.0-1ubuntu2+esm1 |
| opensc_project | opensc | >= 0 < 0.25.0~rc1-1ubuntu0.1~esm1 | 0.25.0~rc1-1ubuntu0.1~esm1 |
CVSS provenance
nvdv3.15.3MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:N/I:N/A:P
osv5.3MEDIUM
vendor_redhat7.5HIGH
vendor_debian5.3MEDIUM
vendor_msrc5.3MEDIUM
vendor_ubuntu5.3MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
opensc vulnerabilities
osv·2025-04-09·CVSS 5.3
[MEDIUM] opensc vulnerabilities
opensc vulnerabilities
USN-7346-1 fixed vulnerabilities in OpenSC. The update introduced a
regression which broke smartcard based authentication. This update fixes
the problem.
We apologize for the inconvenience.
Original advisory details:
It was discovered that OpenSC did not correctly handle certain memory
operations, which could lead to a use-after-free vulnerability. An
attacker could possibly use this issue to cause a denial of service or
execute arbitrary code. This issue only affected Ubuntu 16.04 LTS,
Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-42780)
It was discovered that OpenSC did not correctly handle certain memory
operations, which could lead to a stack buffer overflow. An attacker
could possibly use this issue to cause a denial of service or execute
arbitrary code.
OSV
opensc regression
osv·2025-03-28·CVSS 5.3
[MEDIUM] opensc regression
opensc regression
USN-7346-1 fixed vulnerabilities in OpenSC. The update introduced a
regression in Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, and Ubuntu 20.04 LTS. The
security fix has been removed pending further investigation.
We apologize for the inconvenience.
Original advisory details:
It was discovered that OpenSC did not correctly handle certain memory
operations, which could lead to a use-after-free vulnerability. An
attacker could possibly use this issue to cause a denial of service or
execute arbitrary code. This issue only affected Ubuntu 16.04 LTS,
Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-42780)
It was discovered that OpenSC did not correctly handle certain memory
operations, which could lead to a stack buffer overflow. An attacker
could possibly use this issue to cause
OSV
opensc vulnerabilities
osv·2025-03-12·CVSS 5.3
CVE-2021-42780 [MEDIUM] opensc vulnerabilities
opensc vulnerabilities
It was discovered that OpenSC did not correctly handle certain memory
operations, which could lead to a use-after-free vulnerability. An
attacker could possibly use this issue to cause a denial of service or
execute arbitrary code. This issue only affected Ubuntu 16.04 LTS,
Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-42780)
It was discovered that OpenSC did not correctly handle certain memory
operations, which could lead to a stack buffer overflow. An attacker
could possibly use this issue to cause a denial of service or execute
arbitrary code. This issue only affected Ubuntu 20.04 LTS. (CVE-2021-42782)
It was discovered that OpenSC did not correctly handle the length of
certain buffers, which could lead to a out-of-bounds access vulnerability.
An attacker co
GHSA
GHSA-xq25-8g7f-6hc5: Stack buffer overflow issues were found in Opensc before version 0
ghsa_unreviewed·2022-04-19
CVE-2021-42782 [MEDIUM] CWE-119 GHSA-xq25-8g7f-6hc5: Stack buffer overflow issues were found in Opensc before version 0
Stack buffer overflow issues were found in Opensc before version 0.22.0 in various places that could potentially crash programs using the library.
OSV
CVE-2021-42782: Stack buffer overflow issues were found in Opensc before version 0
osv·2022-04-18·CVSS 5.3
CVE-2021-42782 [MEDIUM] CVE-2021-42782: Stack buffer overflow issues were found in Opensc before version 0
Stack buffer overflow issues were found in Opensc before version 0.22.0 in various places that could potentially crash programs using the library.
Ubuntu
OpenSC vulnerabilities
vendor_ubuntu·2025-04-09·CVSS 5.3
CVE-2021-42780 [MEDIUM] OpenSC vulnerabilities
Title: OpenSC vulnerabilities
Summary: USN-7346-1 introduced a regression in OpenSC.
USN-7346-1 fixed vulnerabilities in OpenSC. The update introduced a
regression which broke smartcard based authentication. This update fixes
the problem.
We apologize for the inconvenience.
Original advisory details:
It was discovered that OpenSC did not correctly handle certain memory
operations, which could lead to a use-after-free vulnerability. An
attacker could possibly use this issue to cause a denial of service or
execute arbitrary code. This issue only affected Ubuntu 16.04 LTS,
Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-42780)
It was discovered that OpenSC did not correctly handle certain memory
operations, which could lead to a stack buffer overflow. An attacker
could possibly use thi
Ubuntu
OpenSC regression
vendor_ubuntu·2025-03-28·CVSS 5.3
[MEDIUM] OpenSC regression
Title: OpenSC regression
Summary: USN-7346-1 introduced a regression in OpenSC.
USN-7346-1 fixed vulnerabilities in OpenSC. The update introduced a
regression in Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, and Ubuntu 20.04 LTS. The
security fix has been removed pending further investigation.
We apologize for the inconvenience.
Original advisory details:
It was discovered that OpenSC did not correctly handle certain memory
operations, which could lead to a use-after-free vulnerability. An
attacker could possibly use this issue to cause a denial of service or
execute arbitrary code. This issue only affected Ubuntu 16.04 LTS,
Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-42780)
It was discovered that OpenSC did not correctly handle certain memory
operations, which could lead to a stack buffe
Ubuntu
OpenSC vulnerabilities
vendor_ubuntu·2025-03-12·CVSS 5.3
CVE-2021-42780 [MEDIUM] OpenSC vulnerabilities
Title: OpenSC vulnerabilities
Summary: Several security issues were fixed in opensc.
It was discovered that OpenSC did not correctly handle certain memory
operations, which could lead to a use-after-free vulnerability. An
attacker could possibly use this issue to cause a denial of service or
execute arbitrary code. This issue only affected Ubuntu 16.04 LTS,
Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-42780)
It was discovered that OpenSC did not correctly handle certain memory
operations, which could lead to a stack buffer overflow. An attacker
could possibly use this issue to cause a denial of service or execute
arbitrary code. This issue only affected Ubuntu 20.04 LTS. (CVE-2021-42782)
It was discovered that OpenSC did not correctly handle the length of
certain buffers, which cou
Red Hat
opensc: Stack overflow vulnerability in OpenSC smart card middleware
vendor_redhat·2023-08-22·CVSS 7.5
CVE-2021-34193 [HIGH] CWE-787 opensc: Stack overflow vulnerability in OpenSC smart card middleware
opensc: Stack overflow vulnerability in OpenSC smart card middleware
Stack overflow vulnerability in OpenSC smart card middleware before 0.23 via crafted responses to APDUs.
Statement: Red Hat Product Security does not consider this to be a vulnerability.
NOTE the reporters of this flaw have identified this as a duplicate flaw [1] and requested it be rejected in NVD.
[1] https://nvd.nist.gov/vuln/detail/CVE-2021-42782
Package: opensc (Red Hat Enterprise Linux 7) - Not affected
Package: opensc (Red Hat Enterprise Linux 8) - Not affected
Package: opensc (Red Hat Enterprise Linux 9) - Not affected
Microsoft
Stack buffer overflow issues were found in Opensc before version 0.22.0 in various places that could potentially crash programs using the library.
vendor_msrc·2022-04-12·CVSS 5.3
CVE-2021-42782 [MEDIUM] CWE-787 Stack buffer overflow issues were found in Opensc before version 0.22.0 in various places that could potentially crash programs using the library.
Stack buffer overflow issues were found in Opensc before version 0.22.0 in various places that could potentially crash programs using the library.
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
redhat: redha
Red Hat
opensc: Stack buffer overflow issues in various places
vendor_redhat·2021-02-19·CVSS 5.3
CVE-2021-42782 [MEDIUM] CWE-119 opensc: Stack buffer overflow issues in various places
opensc: Stack buffer overflow issues in various places
Stack buffer overflow issues were found in Opensc before version 0.22.0 in various places that could potentially crash programs using the library.
A stack buffer overflow issue was found in the OpenSC package. This flaw can potentially crash programs using the library.
Mitigation: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
Package: opensc (Red Hat Enterprise Linux 7) - Out of support scope
Package: opensc (Red Hat Enterprise Linux 8) - Fix deferred
Package: opensc (Red Hat Enterprise Linux 9) - Not affected
Debian
CVE-2021-42782: opensc - Stack buffer overflow issues were found in Opensc before version 0.22.0 in vario...
vendor_debian·2021·CVSS 5.3
CVE-2021-42782 [MEDIUM] CVE-2021-42782: opensc - Stack buffer overflow issues were found in Opensc before version 0.22.0 in vario...
Stack buffer overflow issues were found in Opensc before version 0.22.0 in various places that could potentially crash programs using the library.
Scope: local
bookworm: resolved (fixed in 0.22.0-1)
bullseye: resolved (fixed in 0.21.0-1+deb11u1)
forky: resolved (fixed in 0.22.0-1)
sid: resolved (fixed in 0.22.0-1)
trixie: resolved (fixed in 0.22.0-1)
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://bugzilla.redhat.com/show_bug.cgi?id=2016448https://github.com/OpenSC/OpenSC/commit/1252aca9https://github.com/OpenSC/OpenSC/commit/456ac566https://github.com/OpenSC/OpenSC/commit/7114fb71https://github.com/OpenSC/OpenSC/commit/78cdab94https://github.com/OpenSC/OpenSC/commit/ae1cf0behttps://lists.debian.org/debian-lts-announce/2023/06/msg00025.htmlhttps://security.gentoo.org/glsa/202209-03https://bugzilla.redhat.com/show_bug.cgi?id=2016448https://github.com/OpenSC/OpenSC/commit/1252aca9https://github.com/OpenSC/OpenSC/commit/456ac566https://github.com/OpenSC/OpenSC/commit/7114fb71https://github.com/OpenSC/OpenSC/commit/78cdab94https://github.com/OpenSC/OpenSC/commit/ae1cf0behttps://lists.debian.org/debian-lts-announce/2023/06/msg00025.htmlhttps://lists.debian.org/debian-lts-announce/2024/12/msg00026.htmlhttps://security.gentoo.org/glsa/202209-03
2022-04-18
Published