Executive brief
OpenSC is an open-source suite of tools and libraries for interacting with smart cards and security tokens. A vulnerability in its pkcs11-tool component could allow a buffer overflow to occur during key generation or certificate writing operations. If exploited, this could lead to a service crash or potentially allow unauthorized code execution, though the attack is considered difficult to perform and requires specific user interaction.
Technical details
A classic buffer overflow (CWE-120) exists in OpenSC versions up to 0.26.1 within the pkcs11-tool utility. The flaw is located in the test_kpgen_certwrite function in src/tools/pkcs11-tool.c, where the application fails to properly validate the length of an object ID before copying it into a fixed-size buffer (opt_object_id). An attacker could exploit this by providing a specially crafted URI or object ID that exceeds the buffer's capacity. While the attack vector is listed as remote, it carries high complexity and requires user interaction. A patch has been merged into the master branch (commit 814f745) which adds explicit bounds checking against the size of the destination buffer.
Affected products
- OpenSC OpenSC up to 0.26.1
Timeline
- 2026-05-11: disclosed: Issue reported on GitHub
- 2026-05-15: patched: Fix merged into OpenSC master branch
- 2026-06-01: advisory: CVE-2026-10275 published
References
- https://github.com/OpenSC/OpenSC/
- https://github.com/OpenSC/OpenSC/commit/814f745b3b6d100295f65f1935edd33d520d33ab
- https://github.com/OpenSC/OpenSC/issues/3682
- https://github.com/OpenSC/OpenSC/pull/3684
- https://pan.baidu.com/s/1nrZPKDz2eAcCpsaFiIRlrg
- https://vuldb.com/cve/CVE-2026-10275
- https://vuldb.com/submit/825403