---
id: CVE-2023-40660
title: 'Opensc: potential pin bypass when card tracks its own login state'
summary: >-
  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 pose…
severity: medium
cvss: 6.6
cvssVector: 'CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
cvssSource: cna
cwe:
  - CWE-287
vendor: Red Hat
product: OpenSC
affected:
  - OpenSC >= 0.17.0 < 0.24.0
  - opensc (all versions)
  - opensc (all versions)
  - opensc
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2023-12-19T17:10:37.558723Z'
published: '2023-11-06'
updated: '2026-11-06'
sourceUpdated: '2026-11-06T20:26:32.091Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2023-40660'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2023:7876'
    label: 'RHSA-2023:7876'
  - url: 'https://access.redhat.com/errata/RHSA-2023:7879'
    label: 'RHSA-2023:7879'
  - url: 'https://access.redhat.com/security/cve/CVE-2023-40660'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2240912'
    label: RHBZ#2240912
  - url: 'https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651'
  - url: 'https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1'
  - url: 'https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisories'
tags:
  - cve.org
epss: 0.01038
epssPercentile: 0.64112
ingestedAt: '2026-11-06T21:04:04.248Z'
---

## Overview

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

- `OpenSC >= 0.17.0 < 0.24.0`
- `opensc (all versions)`
- `opensc (all versions)`
- `opensc`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
