CVE-2025-66215
Stack Buffer Overflow in OpenSC card-oberthur via Crafted USB
Publication date: 2026-03-30
Last updated on: 2026-04-01
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| opensc_project | opensc | to 0.27.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-121 | A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). |
Attack-Flow Graph
AI Powered Q&A
What immediate steps should I take to mitigate this vulnerability?
The primary mitigation step is to upgrade OpenSC to version 0.27.0 or later, where the vulnerability has been patched.
Since the vulnerability requires physical access and user interaction with a token, restricting physical access to systems using OpenSC and Oberthur smart cards can reduce risk.
No known workarounds exist other than applying the official patch or upgrade.
Can you explain this vulnerability to me?
CVE-2025-66215 is a stack-based buffer overflow vulnerability in the Oberthur card driver within the OpenSC project. It occurs when a malicious smart card or specially crafted USB device sends responses to APDU commands that exceed the expected size, causing the driver to write beyond the allocated buffer on the stack.
This vulnerability requires physical access to the computer and user interaction, as the attack must happen while a user or administrator is actively using a token. The issue was identified through fuzz testing and fixed in OpenSC version 0.27.0 by improving buffer size checks and replacing hardcoded buffer sizes with defined constants to prevent overflow.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The vulnerability in CVE-2025-66215 causes a low-level impact on confidentiality, integrity, and availability due to a stack-buffer-overflow in the Oberthur card driver of OpenSC. However, the provided information does not explicitly discuss or link this vulnerability to compliance issues with common standards or regulations such as GDPR or HIPAA.
How can this vulnerability impact me? :
Exploitation of this vulnerability can lead to application crashes, data corruption, or other unexpected behaviors in applications using OpenSC tools, including the PKCS#11 module, Windows minidriver, and macOS token support.
The impact on confidentiality, integrity, and availability is considered low, but it still poses risks such as potential data corruption or denial of service during token usage.
The attack requires physical access, high complexity, and user interaction, which limits the likelihood but does not eliminate the risk.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability involves a stack-buffer-overflow triggered by specially crafted APDU responses from a malicious USB device or smart card. Detection requires monitoring for abnormal or unexpected APDU responses or application crashes related to OpenSC's Oberthur card driver.
Since the vulnerability is triggered by physical access and crafted smart cards or USB devices, network detection is not applicable. Instead, detection should focus on system logs or application behavior when using OpenSC tools.
No specific detection commands are provided in the available resources. However, you may consider monitoring OpenSC logs or running OpenSC commands such as `opensc-tool -l` to list connected smart cards and observe any unusual behavior or errors during interaction with Oberthur cards.