Skip to content
Fencer Vulns
medium 5.4

CVE-2023-40661 json

Opensc: multiple memory issues with pkcs15-init (enrollment tool)

published 2023-11-06 3 y ago modified 2026-11-06 2 d ago also EUVD-2023-45217

cvss
5.4
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.3%
EPSS 1.3% chance of exploitation in 30 days, percentile 71%
public exploits
0
none known

Summary

Several memory vulnerabilities were identified within the OpenSC packages, particularly in the card enrollment process using pkcs15-init when a user or administrator enrolls cards. To take advantage of these flaws, an attacker must have physical access to the computer system and employ a custom-crafted USB device or smart card to manipulate responses to APDUs. This manipulation can potentially allow compromise key generation, certificate loading, and other card management operations during enrollment.

Patch / fix

  • Red Hat Red Hat Enterprise Linux 8 0:0.20.0-7.el8_9
  • Red Hat Red Hat Enterprise Linux 9 0:0.23.0-3.el9_3
  • opensc Debian 12 0.23.0-0.3+deb12u1
  • opensc Debian 14, Debian 13 0.23.0-2

debian advisories DEBIAN-CVE-2023-40661

  • opensc Ubuntu Pro 20.04 LTS 0.20.0-3ubuntu0.1~esm4
  • opensc Ubuntu Pro 22.04 LTS 0.22.0-1ubuntu2+esm1

ubuntu advisories UBUNTU-CVE-2023-40661

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • opensc RHEL 9 0.23.0-3.el9_3
  • opensc RHEL 8 0.20.0-7.el8_9

red hat advisories RHSA-2023:7879RHSA-2023:7876

  • opensc SLES for SAP 15 SP3, SLES for SAP 15 SP2, SLES for SAP 15 SP1 +12 more 0.19.0-150100.3.25.1
  • opensc SLE Module for Basesystem 15 SP5, SLE Module for Basesystem 15 SP4, SLE Micro 5.5 +2 more 0.22.0-150400.3.6.1
  • opensc SLES for SAP 12 SP5, SLES 12 SP5 0.13.0-3.25.1

suse advisories SUSE-SU-2023:4104-1SUSE-SU-2023:4089-1SUSE-SU-2023:4065-1

  • opensc openSUSE Tumbleweed 0.23.0-3.1

opensuse advisories openSUSE-SU-2024:13314-1

  • opensc AlmaLinux 8 0.20.0-7.el8_9
  • opensc AlmaLinux 9 0.23.0-3.el9_3

almalinux advisories ALSA-2023:7876ALSA-2023:7879

  • opensc Alpine 3.24, Alpine 3.23, Alpine 3.22 +3 more 0.24.0-r0

alpine advisories ALPINE-CVE-2023-40661

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • opensc CBL-Mariner 2.0 0.23.0-5
  • opensc Azure Linux 3.0 0.25.1-3

azure linux advisories AZL-31944AZL-35075

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2023-40661 updated cvss 5.4

OpenSC: multiple memory issues with pkcs15-init (enrollment tool)

  • Red Hat Enterprise Linux 7 opensc
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux BaseOS (v. 8) opensc 0.20.0-7.el8_9
    fixed: vendor fix RHSA-2023:7876
  • Red Hat Enterprise Linux BaseOS (v. 9) opensc 0.23.0-3.el9_3
    fixed: vendor fix RHSA-2023:7879

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

1.32% chance of exploitation in the next 30 days, higher than 71% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 5.4 CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
NVD 3.1 6.4 CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Affected products

  • Red Hat Red Hat Enterprise Linux 8
  • Red Hat Red Hat Enterprise Linux 9
  • Red Hat Red Hat Enterprise Linux 7

Classification

Weakness
  • CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.