Enterprise LinuxOperating system · Redhat

CVE-2023-40661

MEDIUM · 6.4 CVSS v3.1 Published 2023-11-06
Fix available
A fix is available. Upgrade to after 0.23.0 or later.
See remediation →
64/100
Remediation priority · Elevated

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · moderate confidence

Memory vulnerabilities exist in OpenSC's pkcs15-init tool during smart card enrollment. An attacker with physical access can use a crafted USB device or smart card to manipulate APDU responses, potentially compromising key generation, certificate loading, and other card management operations.

MitigationUpdate OpenSC to the latest patched version. Restrict physical access to systems during card enrollment operations and implement additional verification for card enrollment procedures.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Enterprise LinuxOperating system
Affected:= 8.0= 9.0
OpenscApplication
Affected:<= 0.23.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Physical
Complexity
Low
Privileges
Low
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Determine if OpenSC is installed
    Run 'rpm -qa | grep -i opensc' on RHEL-based systems, or 'dpkg -l | grep -i opensc' on Debian-based systems, or check for the opensc package via your system's package manager
    Affected if OpenSC package is present on the system
  2. Check the installed OpenSC version on RHEL
    Run 'rpm -q --queryformat '%{VERSION}-%{RELEASE}' opensc' to get the exact version number
    Affected if The version returned is less than or equal to 0.23.0, or the package is opensc-0.23.0 or earlier
  3. Verify pkcs15-init tool availability
    Run 'which pkcs15-init' or check if the binary exists at /usr/bin/pkcs15-init or /usr/local/bin/pkcs15-init
    Affected if The pkcs15-init binary is present on the system
  4. Check for recent smart card enrollment activity
    Review system logs in /var/log/ for entries containing 'pkcs15-init' or smart card related operations, or check for history of running pkcs15-init commands
    Affected if pkcs15-init has been executed for card enrollment operations

A system is affected if OpenSC version 0.23.0 or earlier is installed and pkcs15-init has been used for smart card enrollment operations on the system.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to a release after 0.23.0
Interim mitigation

Update OpenSC to the latest patched version. Restrict physical access to systems during card enrollment operations and implement additional verification for card enrollment procedures.

Recommended fix Moderate confidence

OpenSC 0.24.0 or later; or vendor-specific patched version via RHSA

  1. Check for vendor security advisories: For Red Hat systems, run 'yum updateinfo list all' or 'dnf updateinfo list all' to see available security updates
  2. For Red Hat Enterprise Linux 8: Look for RHSA (Red Hat Security Advisory) related to opensc and CVE-2023-40661
  3. For Red Hat Enterprise Linux 9: Similarly check for RHSA advisories for opensc
  4. Apply the vendor patch: On RHEL systems run 'yum update opensc' or 'dnf update opensc'
  5. Verify the update: After patching, confirm the installed version with 'rpm -q opensc'
  6. For non-Red Hat systems using upstream OpenSC: Upgrade to OpenSC version 0.24.0 or later which contains the fix for this vulnerability
  7. Restart any services or applications that use OpenSC after the update

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Enterprise Linux Scoped from the published advisory
  • Consultation4.0 h
  • Implementation2.0 h
  • Testing4.0 h
  • Review / QA2.0 h
12.0 hours of engineering $2,120
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,392.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2023-40661 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2023-40661 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data