CVE-2023-40660
published 2023-11-06CVE-2023-40660: A flaw was found in OpenSC packages that allow a potential PIN bypass. When a token/card is authenticated by one process, it can perform cryptographic…
PriorityP429medium6.6CVSS 3.1
AVPACLPRNUIRSUCHIHAH
EPSS
0.92%
56.5th percentile
A flaw was found in OpenSC packages that allow a potential PIN bypass. When a token/card is authenticated by one process, it can perform cryptographic operations in other processes when an empty zero-length pin is passed. This issue poses a security risk, particularly for OS logon/screen unlock and for small, permanently connected tokens to computers. Additionally, the token can internally track login status. This flaw allows an attacker to gain unauthorized access, carry out malicious actions, or compromise the system without the user's awareness.
Affected
20 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | opensc | < opensc 0.23.0-0.3+deb12u1 (bookworm) | opensc 0.23.0-0.3+deb12u1 (bookworm) |
| msrc | azl3_opensc_0.23.0-1_on_azure_linux_3.0 | — | — |
| msrc | azl3_opensc_0.25.1-3_on_azure_linux_3.0 | — | — |
| msrc | cbl2_opensc_0.23.0-4_on_cbl_mariner_2.0 | — | — |
| opensc_project | opensc | <= 0.23.0 | — |
| opensc_project | opensc | >= 0 < 0.21.0-1+deb11u1 | 0.21.0-1+deb11u1 |
| opensc_project | opensc | >= 0 < 0.23.0-0.3+deb12u1 | 0.23.0-0.3+deb12u1 |
| opensc_project | opensc | >= 0 < 0.23.0-2 | 0.23.0-2 |
| opensc_project | opensc | >= 0 < 0.23.0-2 | 0.23.0-2 |
| 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 |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux | — | — |
CVSS provenance
nvdv3.16.6MEDIUMCVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
osv6.6MEDIUM
vendor_debian6.6MEDIUM
vendor_msrc6.6MEDIUM
vendor_redhat6.6MEDIUM
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
OSV
CVE-2023-40660: A flaw was found in OpenSC packages that allow a potential PIN bypass
osv·2023-11-06·CVSS 6.6
CVE-2023-40660 [MEDIUM] CVE-2023-40660: A flaw was found in OpenSC packages that allow a potential PIN bypass
A flaw was found in OpenSC packages that allow a potential PIN bypass. When a token/card is authenticated by one process, it can perform cryptographic operations in other processes when an empty zero-length pin is passed. This issue poses a security risk, particularly for OS logon/screen unlock and for small, permanently connected tokens to computers. Additionally, the token can internally track login status. This flaw allows an attacker to gain unauthorized access, carry out malicious actions, or compromise the system without the user's awareness.
GHSA
GHSA-7635-x5f9-5458: A flaw was found in OpenSC packages that allow a potential PIN bypass
ghsa_unreviewed·2023-11-06
CVE-2023-40660 [MEDIUM] CWE-287 GHSA-7635-x5f9-5458: A flaw was found in OpenSC packages that allow a potential PIN bypass
A flaw was found in OpenSC packages that allow a potential PIN bypass. When a token/card is authenticated by one process, it can perform cryptographic operations in other processes when an empty zero-length pin is passed. This issue poses a security risk, particularly for OS logon/screen unlock and for small, permanently connected tokens to computers. Additionally, the token can internally track login status. This flaw allows an attacker to gain unauthorized access, carry out malicious actions, or compromise the system without the user's awareness.
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
Microsoft
Opensc: potential pin bypass when card tracks its own login state
vendor_msrc·2023-11-14·CVSS 6.6
CVE-2023-40660 [MEDIUM] CWE-287 Opensc: potential pin bypass when card tracks its own login state
Opensc: potential pin bypass when card tracks its own login state
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: redhat
Customer Action Required: Yes
Remediation: CBL-Mariner Releases
Reference: h
Red Hat
OpenSC: Potential PIN bypass when card tracks its own login state
vendor_redhat·2023-09-25·CVSS 6.6
CVE-2023-40660 [MEDIUM] CWE-287 OpenSC: Potential PIN bypass when card tracks its own login state
OpenSC: Potential PIN bypass when card tracks its own login state
A flaw was found in OpenSC packages that allow a potential PIN bypass. When a token/card is authenticated by one process, it can perform cryptographic operations in other processes when an empty zero-length pin is passed. This issue poses a security risk, particularly for OS logon/screen unlock and for small, permanently connected tokens to computers. Additionally, the token can internally track login status. This flaw allows an attacker to gain unauthorized access, carry out malicious actions, or compromise the system without the user's awareness.
A flaw was found in OpenSC packages that allow a potential PIN bypass. When a token/card is authenticated by one process, it can perform cryptographic operations in other proces
Debian
CVE-2023-40660: opensc - A flaw was found in OpenSC packages that allow a potential PIN bypass. When a to...
vendor_debian·2023·CVSS 6.6
CVE-2023-40660 [MEDIUM] CVE-2023-40660: opensc - A flaw was found in OpenSC packages that allow a potential PIN bypass. When a to...
A flaw was found in OpenSC packages that allow a potential PIN bypass. When a token/card is authenticated by one process, it can perform cryptographic operations in other processes when an empty zero-length pin is passed. This issue poses a security risk, particularly for OS logon/screen unlock and for small, permanently connected tokens to computers. Additionally, the token can internally track login status. This flaw allows an attacker to gain unauthorized access, carry out malicious actions, or compromise the system without the user's awareness.
Scope: local
bookworm: resolved (fixed in 0.23.0-0.3+deb12u1)
bullseye: resolved (fixed in 0.21.0-1+deb11u1)
forky: resolved (fixed in 0.23.0-2)
sid: resolved (fixed in 0.23.0-2)
trixie: resolved (fixed in 0.23.0-2)
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://access.redhat.com/errata/RHSA-2023:7876https://access.redhat.com/errata/RHSA-2023:7879https://access.redhat.com/security/cve/CVE-2023-40660https://bugzilla.redhat.com/show_bug.cgi?id=2240912https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisorieshttp://www.openwall.com/lists/oss-security/2023/12/13/2https://access.redhat.com/errata/RHSA-2023:7876https://access.redhat.com/errata/RHSA-2023:7879https://access.redhat.com/security/cve/CVE-2023-40660https://bugzilla.redhat.com/show_bug.cgi?id=2240912https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisorieshttps://lists.debian.org/debian-lts-announce/2023/11/msg00024.htmlhttps://lists.debian.org/debian-lts-announce/2024/12/msg00026.htmlhttps://lists.fedoraproject.org/archives/list/[email protected]/message/3CPQOMCDWFRBMEFR5VK4N5MMXXU42ODE/https://lists.fedoraproject.org/archives/list/[email protected]/message/GLYEFIBBA37TK3UNMZN5NOJ7IWCIXLQP/
2023-11-06
Published