CVE-2023-40661
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 · uneditedSeveral 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 confidenceMemory 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.
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= 8.0= 9.0<= 0.23.0CVSS 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 checksWork through these to decide whether this CVE applies to you.
-
Determine if OpenSC is installedRun '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 managerAffected if OpenSC package is present on the system
-
Check the installed OpenSC version on RHELRun 'rpm -q --queryformat '%{VERSION}-%{RELEASE}' opensc' to get the exact version numberAffected if The version returned is less than or equal to 0.23.0, or the package is opensc-0.23.0 or earlier
-
Verify pkcs15-init tool availabilityRun 'which pkcs15-init' or check if the binary exists at /usr/bin/pkcs15-init or /usr/local/bin/pkcs15-initAffected if The pkcs15-init binary is present on the system
-
Check for recent smart card enrollment activityReview system logs in /var/log/ for entries containing 'pkcs15-init' or smart card related operations, or check for history of running pkcs15-init commandsAffected 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.
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 · scopedUpdate OpenSC to the latest patched version. Restrict physical access to systems during card enrollment operations and implement additional verification for card enrollment procedures.
OpenSC 0.24.0 or later; or vendor-specific patched version via RHSA
- Check for vendor security advisories: For Red Hat systems, run 'yum updateinfo list all' or 'dnf updateinfo list all' to see available security updates
- For Red Hat Enterprise Linux 8: Look for RHSA (Red Hat Security Advisory) related to opensc and CVE-2023-40661
- For Red Hat Enterprise Linux 9: Similarly check for RHSA advisories for opensc
- Apply the vendor patch: On RHEL systems run 'yum update opensc' or 'dnf update opensc'
- Verify the update: After patching, confirm the installed version with 'rpm -q opensc'
- For non-Red Hat systems using upstream OpenSC: Upgrade to OpenSC version 0.24.0 or later which contains the fix for this vulnerability
- Restart any services or applications that use OpenSC after the update
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation2.0 h
- Testing4.0 h
- Review / QA2.0 h
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 locallyCheck 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2023-40661 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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