CVE-2026-40253

Source
https://cve.org/CVERecord?id=CVE-2026-40253
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-40253.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-40253
Aliases
  • GHSA-c9cf-6vr4-wfxm
Downstream
Related
Published
2026-04-16T22:04:44.005Z
Modified
2026-06-26T15:29:11.737475891Z
Severity
  • 6.8 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H CVSS Calculator
Summary
openCryptoki: Memory safety vulnerabilities in BER/DER decoders in asn1.c
Details

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.

Database specific
{
    "cna_assigner": "GitHub_M",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40253.json",
    "cwe_ids": [
        "CWE-125"
    ]
}
References

Affected packages

Git / github.com/opencryptoki/opencryptoki

Affected ranges

Type
GIT
Repo
https://github.com/opencryptoki/opencryptoki
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
{
    "source": [
        "CPE_RANGE",
        "REFERENCES"
    ],
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "last_affected": "3.26.0"
        }
    ],
    "cpe": "cpe:2.3:a:opencryptoki_project:opencryptoki:*:*:*:*:*:*:*:*"
}

Affected versions

v2.*
v2.3.2
v2.3.3
v2.4.3
v2.4.3.1
v3.*
v3.0
v3.1
v3.10.0
v3.11.0
v3.11.1
v3.12.0
v3.12.1
v3.13.0
v3.14.0
v3.15.0
v3.15.1
v3.16.0
v3.17.0
v3.18.0
v3.19.0
v3.2
v3.20.0
v3.21.0
v3.22.0
v3.23.0
v3.24.0
v3.25.0
v3.26.0
v3.3
v3.4
v3.4.1
v3.5
v3.6
v3.6.1
v3.6.2
v3.7.0
v3.8.0
v3.8.1
v3.8.2
v3.9.0

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-40253.json"