CVE-2026-40253: openCryptoki: Memory safety vulnerabilities in BER/DER decoders in asn1.c

Published Apr 16, 2026
·
Updated

Last updated 1 September 2026

Other sources

openCryptoki is a PKCS#11 library and provides tooling for Linux and AIX. In versions 3.26.0 and below, the BER/DER decoding functions in the shared common library (asn1.c) accept a raw pointer but no buffer length parameter, and trust attacker-controlled BER length fields without validating them against actual buffer boundaries. All primitive decoders are affected: berdecodeINTEGER, berdecodeSEQUENCE, berdecodeOCTETSTRING, berdecodeBITSTRING, and berdecodeCHOICE. Additionally, berdecodeINTEGER can produce integer underflows when the encoded length is zero. An attacker supplying a malformed BER-encoded cryptographic object through PKCS#11 operations such as CCreateObject or CUnwrapKey, token loading from disk, or remote backend communication can trigger out-of-bounds reads. This affects all token backends (Soft, ICA, CCA, TPM, EP11, ICSF) since the vulnerable code is in the shared common library. A patch is available thorugh commit ed378f463ef73364c89feb0fc923f4dc867332a3.

— MITRE

Affected Software

4 affected componentsFixes available
Opencryptoki opencryptoki<=3.26.0
Opencryptoki Project Opencryptoki<=3.26.0
debian/opencryptoki<=3.8.1+dfsg-3.2, <=3.23.0+dfsg-0.3
3.27.0-1
IBM Cloud Pak for Data System (Yosemite 1.0)<=11.3.1.2-IF1 - 11.3.1.2-IF2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/opencryptoki to a version that resolves this vulnerability.

    Fixed in 3.27.0-1
  2. Upgrade

    Upgrade openCryptoki to a version that resolves this vulnerability.

    Patch ed378f463ef73364c89feb0fc923f4dc867332a3
  3. Compensating control

    Mitigate by preventing or restricting use of PKCS#11 operations that accept attacker-supplied malformed BER-encoded cryptographic objects (e.g., limit/validate inputs to C_CreateObject and C_UnwrapKey), including for token loading from disk and remote backend communication paths.

Event History

Apr 16, 2026
CVE Published
via MITRE·10:04 PM
Data Sourced
via MITRE·10:04 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·11:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·11:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Oct 21, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2026-40253?

CVE-2026-40253 has been classified as a memory safety vulnerability, which can lead to potential program crashes or exploitation.

2

How do I fix CVE-2026-40253?

To fix CVE-2026-40253, update to the latest version of openCryptoki that is higher than 3.26.0.

3

What software is affected by CVE-2026-40253?

CVE-2026-40253 affects openCryptoki versions 3.26.0 and below.

4

What are the implications of not addressing CVE-2026-40253?

Failing to address CVE-2026-40253 can result in potential security vulnerabilities, including crashes and unauthorized access.

5

Where can I find more information about CVE-2026-40253?

More information about CVE-2026-40253 can be found on the official GitHub advisories page for openCryptoki.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203