Junglewise Threat Intelligence

CVE-2026-10275: OpenSC pkcs11-tool buffer overflow in test_kpgen_certwrite

CVE-2026-10275 · Severity: medium · CVSS 5 · Published 2026-06-01

Technologies: OpenSC Project OpenSC. Vendors: OpenSC Project.

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

Related threats