CVE-2023-40660: Opensc: potential pin bypass when card tracks its own login state

Published Sep 27, 2023
·
Updated

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.

Other sources

When the token/card was plugged into the computer and authenticated from one process, it could be used to provide cryptographic operations from different process when the empty, zero-length PIN and the token can track the login status using some of its internals. This is dangerous for OS logon/screen unlock and small tokens that are plugged permanently to the computer. The bypass was removed and OpenSC implemented explicit logout for most of the card drivers to prevent leaving unattended logged-in tokens

Affected versions: OpenSC 0.17.0 - 0.23.0

https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651 https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisories https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1

— Red Hat

Affected Software

17 affected componentsFixes available
redhat/opensc<0.24.0
0.24.0
Opensc Project Opensc<=0.23.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
debian/opensc<0.23.0-0.3+deb12u1
0.23.0-0.3+deb12u1
debian/opensc<0.23.0-2
0.23.0-2
debian/opensc<0.23.0-2
0.23.0-2
debian/opensc
0.23.0-0.3+deb12u20.26.1-20.27.1-3
ubuntu/opensc<0.20.0-3ubuntu0.1~esm4
0.20.0-3ubuntu0.1~esm4
ubuntu/opensc<0.22.0-1ubuntu2+esm1
0.22.0-1ubuntu2+esm1
alpine/opensc<0.24.0-r0
0.24.0-r0
alpine/opensc<0.24.0-r0
0.24.0-r0
alpine/opensc<0.24.0-r0
0.24.0-r0
alpine/opensc<0.24.0-r0
0.24.0-r0
alpine/opensc<0.24.0-r0
0.24.0-r0
alpine/opensc<0.24.0-r0
0.24.0-r0
alpine/opensc<0.24.0-r0
0.24.0-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/OpenSC to a version that resolves this vulnerability.

    Fixed in 0.24.0
  2. Upgrade

    Upgrade alpine/opensc to a version that resolves this vulnerability.

    Fixed in 0.24.0-r0
  3. Upgrade

    Upgrade debian/opensc to a version that resolves this vulnerability.

    Fixed in 0.23.0-0.3+deb12u1
  4. Upgrade

    Upgrade debian/opensc to a version that resolves this vulnerability.

    Fixed in 0.23.0-2
  5. Upgrade

    Upgrade debian/opensc to a version that resolves this vulnerability.

    Fixed in 0.23.0-0.3+deb12u2Fixed in 0.26.1-2Fixed in 0.27.1-3
  6. Upgrade

    Upgrade ubuntu/opensc to a version that resolves this vulnerability.

    Fixed in 0.20.0-3ubuntu0.1~esm4
  7. Upgrade

    Upgrade ubuntu/opensc to a version that resolves this vulnerability.

    Fixed in 0.22.0-1ubuntu2+esm1
  8. Upgrade

    Upgrade OpenSC to a version that resolves this vulnerability.

    Fixed in 0.24.0

Event History

Sep 27, 2023
Data Sourced
08:41 AM
DescriptionSeverityAffected Software
Nov 6, 2023
CVE Published
via MITRE·04:58 PM
Data Sourced
04:58 PM
Weakness
Data Sourced
via OSV·04:58 PM
DescriptionSeverityWeakness
Nov 14, 2023
Updated
05:12 PM
SeverityWeakness
Nov 27, 2023
Updated
03:15 AM
Affected Software
Dec 13, 2023
Updated
06:15 PM
Affected Software
Dec 18, 2023
Data Sourced
via Red Hat·11:01 AM
DescriptionSeverityAffected Software
Dec 19, 2023
Updated
04:15 PM
Affected Software
Dec 22, 2023
Updated
04:15 AM
Affected Software
Dec 23, 2023
Data Sourced
via NVD·05:15 AM
DescriptionSeverityWeaknessAffected Software
Updated
05:15 AM
Affected Software
Jan 23, 2024
Data Sourced
via MITRE·02:15 AM
DescriptionSeverityWeakness
Sep 16, 2024
Updated
via NVD·05:15 PM
Affected Software
Nov 23, 2024
Updated
via MITRE·03:33 AM
Weakness
Updated
via NVD·04:15 AM
WeaknessAffected Software
Dec 4, 2024
Updated
via MITRE·07:16 AM
Weakness
Updated
via NVD·08:15 AM
WeaknessAffected Software
Nov 3, 2025
Updated
via NVD·10:16 PM
Affected Software
Jun 17, 2026
Updated
via NVD·06:18 AM
Affected Software
Nov 24, 2026
Data Sourced
via OSV·02:54 PM
Affected Software
Dec 3, 2026
Updated
via OSV·11:33 PM
Affected Software

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is CVE-2023-40660?

CVE-2023-40660 is a vulnerability in OpenSC packages that allows a potential PIN bypass.

2

How does CVE-2023-40660 work?

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.

3

What is the severity of CVE-2023-40660?

The severity of CVE-2023-40660 is medium, with a CVSS score of 6.6.

4

How do I fix CVE-2023-40660?

To fix CVE-2023-40660, update to version 0.24.0 of OpenSC packages.

5

Are there any references for CVE-2023-40660?

Yes, you can refer to the following links for more information: [Red Hat Security Advisory](https://access.redhat.com/security/cve/CVE-2023-40660), [Bugzilla](https://bugzilla.redhat.com/show_bug.cgi?id=2240912), [GitHub Issue](https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203