{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40253 exists.","fix":"Apply the vendor's patch.","what":"CVE-2026-40253 is a medium-severity memory corruption vulnerability in opencryptoki, published on 16 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-40253 and fix it if it is affected.\n\nWhat it is: CVE-2026-40253 is a medium-severity memory corruption vulnerability in opencryptoki, published on 16 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40253 exists.\n\nAffected product: opencryptoki. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40253/ (Markdown: https://insights.sbomify.com/CVE-2026-40253/index.md)","id":"CVE-2026-40253","markdown":"https://insights.sbomify.com/CVE-2026-40253/index.md","name":"CVE-2026-40253","record":{"aliases":["ALSA-2026:26352","ALSA-2026:28231","ALSA-2026:28256","AZL-82982","CLSA-2026-1788955910","CLSA-2026-1790079559","DEBIAN-CVE-2026-40253","GHSA-c9cf-6vr4-wfxm","OESA-2026-2163","OESA-2026-2164","OESA-2026-2165","OESA-2026-2166","RHSA-2026:26352","RHSA-2026:28231","RHSA-2026:28256","RHSA-2026:33519","RHSA-2026:36697","RHSA-2026:36717","RLSA-2026:26352","RLSA-2026:28231","RLSA-2026:28256","SUSE-SU-2026:1658-1","SUSE-SU-2026:1723-1","SUSE-SU-2026:21492-1","SUSE-SU-2026:21575-1","SUSE-SU-2026:21593-1","SUSE-SU-2026:21637-1","SUSE-SU-2026:2355-1","SUSE-SU-2026:2685-1","SUSE-SU-2026:2685-2","SUSE-SU-2026:2757-1","UBUNTU-CVE-2026-40253","openSUSE-SU-2026:10593-1","openSUSE-SU-2026:20699-1"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["denial_of_service","data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"PKCS#11 library","requires_auth":"none","summary":"Attackers can trigger out-of-bounds reads in openCryptoki via malformed BER-encoded objects, potentially causing crashes or information disclosure.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"opencryptoki","vendor":"opencryptoki_project"}],"cvss":{"score":6.8,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"}],"description":"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: ber_decode_INTEGER, ber_decode_SEQUENCE, ber_decode_OCTET_STRING, ber_decode_BIT_STRING, and ber_decode_CHOICE. Additionally, ber_decode_INTEGER 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 C_CreateObject or C_UnwrapKey, 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.","ecosystems":["AlmaLinux:10","AlmaLinux:8","AlmaLinux:9","Red Hat:enterprise_linux:10.2","Red Hat:enterprise_linux:8::baseos","Red Hat:enterprise_linux:8::crb","Red Hat:enterprise_linux:9::baseos","Red Hat:enterprise_linux:9::crb","Red Hat:enterprise_linux_eus:10.0","Red Hat:rhel_e4s:9.4::baseos","Red Hat:rhel_eus:9.6::baseos","Red Hat:rhel_eus:9.6::crb","Rocky Linux:10","Rocky Linux:8","Rocky Linux:9","SUSE:Linux Enterprise Micro 5.4","SUSE:Linux Enterprise Module for Server Applications 15 SP7","SUSE:Linux Enterprise Server 12 SP5-LTSS","SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"openCryptoki: Memory safety vulnerabilities in BER/DER decoders in asn1.c","id":"CVE-2026-40253","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"memory_corruption","year":"2026"},"n_packages":155,"n_references":2,"next":{"headline":"FreeRDP: contains_dotdot() off-by-one allows drive channel path traversal via terminal ..","id":"CVE-2026-40254"},"packages":[{"ecosystem":"AlmaLinux:10","fixed":["3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki","purl":"pkg:rpm/almalinux/opencryptoki","source":"ALSA-2026:28231"},{"ecosystem":"AlmaLinux:10","fixed":["3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-ccatok","purl":"pkg:rpm/almalinux/opencryptoki-ccatok","source":"ALSA-2026:28231"},{"ecosystem":"AlmaLinux:10","fixed":["3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-devel","purl":"pkg:rpm/almalinux/opencryptoki-devel","source":"ALSA-2026:28231"},{"ecosystem":"AlmaLinux:10","fixed":["3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-ep11tok","purl":"pkg:rpm/almalinux/opencryptoki-ep11tok","source":"ALSA-2026:28231"},{"ecosystem":"AlmaLinux:10","fixed":["3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-icatok","purl":"pkg:rpm/almalinux/opencryptoki-icatok","source":"ALSA-2026:28231"},{"ecosystem":"AlmaLinux:10","fixed":["3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-icsftok","purl":"pkg:rpm/almalinux/opencryptoki-icsftok","source":"ALSA-2026:28231"},{"ecosystem":"AlmaLinux:10","fixed":["3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-libs","purl":"pkg:rpm/almalinux/opencryptoki-libs","source":"ALSA-2026:28231"},{"ecosystem":"AlmaLinux:10","fixed":["3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-swtok","purl":"pkg:rpm/almalinux/opencryptoki-swtok","source":"ALSA-2026:28231"},{"ecosystem":"AlmaLinux:8","fixed":["3.22.0-3.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"opencryptoki","purl":"pkg:rpm/almalinux/opencryptoki","source":"ALSA-2026:26352"},{"ecosystem":"AlmaLinux:8","fixed":["3.22.0-3.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-ccatok","purl":"pkg:rpm/almalinux/opencryptoki-ccatok","source":"ALSA-2026:26352"},{"ecosystem":"AlmaLinux:8","fixed":["3.22.0-3.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-devel","purl":"pkg:rpm/almalinux/opencryptoki-devel","source":"ALSA-2026:26352"},{"ecosystem":"AlmaLinux:8","fixed":["3.22.0-3.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-ep11tok","purl":"pkg:rpm/almalinux/opencryptoki-ep11tok","source":"ALSA-2026:26352"},{"ecosystem":"AlmaLinux:8","fixed":["3.22.0-3.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-icatok","purl":"pkg:rpm/almalinux/opencryptoki-icatok","source":"ALSA-2026:26352"},{"ecosystem":"AlmaLinux:8","fixed":["3.22.0-3.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-icsftok","purl":"pkg:rpm/almalinux/opencryptoki-icsftok","source":"ALSA-2026:26352"},{"ecosystem":"AlmaLinux:8","fixed":["3.22.0-3.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-libs","purl":"pkg:rpm/almalinux/opencryptoki-libs","source":"ALSA-2026:26352"},{"ecosystem":"AlmaLinux:8","fixed":["3.22.0-3.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-swtok","purl":"pkg:rpm/almalinux/opencryptoki-swtok","source":"ALSA-2026:26352"},{"ecosystem":"AlmaLinux:8","fixed":["3.22.0-3.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-tpmtok","purl":"pkg:rpm/almalinux/opencryptoki-tpmtok","source":"ALSA-2026:26352"},{"ecosystem":"AlmaLinux:9","fixed":["3.26.0-2.el9_8.2"],"introduced":["0"],"last_affected":[],"package":"opencryptoki","purl":"pkg:rpm/almalinux/opencryptoki","source":"ALSA-2026:28256"},{"ecosystem":"AlmaLinux:9","fixed":["3.26.0-2.el9_8.2"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-ccatok","purl":"pkg:rpm/almalinux/opencryptoki-ccatok","source":"ALSA-2026:28256"},{"ecosystem":"AlmaLinux:9","fixed":["3.26.0-2.el9_8.2"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-devel","purl":"pkg:rpm/almalinux/opencryptoki-devel","source":"ALSA-2026:28256"},{"ecosystem":"AlmaLinux:9","fixed":["3.26.0-2.el9_8.2"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-ep11tok","purl":"pkg:rpm/almalinux/opencryptoki-ep11tok","source":"ALSA-2026:28256"},{"ecosystem":"AlmaLinux:9","fixed":["3.26.0-2.el9_8.2"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-icatok","purl":"pkg:rpm/almalinux/opencryptoki-icatok","source":"ALSA-2026:28256"},{"ecosystem":"AlmaLinux:9","fixed":["3.26.0-2.el9_8.2"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-icsftok","purl":"pkg:rpm/almalinux/opencryptoki-icsftok","source":"ALSA-2026:28256"},{"ecosystem":"AlmaLinux:9","fixed":["3.26.0-2.el9_8.2"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-libs","purl":"pkg:rpm/almalinux/opencryptoki-libs","source":"ALSA-2026:28256"},{"ecosystem":"AlmaLinux:9","fixed":["3.26.0-2.el9_8.2"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-swtok","purl":"pkg:rpm/almalinux/opencryptoki-swtok","source":"ALSA-2026:28256"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki","purl":"pkg:rpm/redhat/opencryptoki","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-ccatok","purl":"pkg:rpm/redhat/opencryptoki-ccatok","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-ccatok-debuginfo","purl":"pkg:rpm/redhat/opencryptoki-ccatok-debuginfo","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-debuginfo","purl":"pkg:rpm/redhat/opencryptoki-debuginfo","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-debugsource","purl":"pkg:rpm/redhat/opencryptoki-debugsource","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-devel","purl":"pkg:rpm/redhat/opencryptoki-devel","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-ep11tok","purl":"pkg:rpm/redhat/opencryptoki-ep11tok","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-ep11tok-debuginfo","purl":"pkg:rpm/redhat/opencryptoki-ep11tok-debuginfo","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-icatok","purl":"pkg:rpm/redhat/opencryptoki-icatok","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-icatok-debuginfo","purl":"pkg:rpm/redhat/opencryptoki-icatok-debuginfo","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-icsftok","purl":"pkg:rpm/redhat/opencryptoki-icsftok","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-icsftok-debuginfo","purl":"pkg:rpm/redhat/opencryptoki-icsftok-debuginfo","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-libs","purl":"pkg:rpm/redhat/opencryptoki-libs","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-libs-debuginfo","purl":"pkg:rpm/redhat/opencryptoki-libs-debuginfo","source":"RHSA-2026:28231"},{"ecosystem":"Red Hat:enterprise_linux:10.2","fixed":["0:3.26.0-3.el10_2.1"],"introduced":["0"],"last_affected":[],"package":"opencryptoki-swtok","purl":"pkg:rpm/redhat/opencryptoki-swtok","source":"RHSA-2026:28231"}],"prev":{"headline":"Broken Access Control (IDOR) Leading to Cross-Tenant Application Access in FastGPT","id":"CVE-2026-40252"},"products":["opencryptoki"],"published":"2026-04-16","related":[{"cvss_score":6.8,"headline":"openCryptoki has improper link resolution before file access (link following)","id":"CVE-2026-23893","kev_date_added":null,"published":"2026-01-22"},{"cvss_score":6.6,"headline":"openCryptoki incorrectly calculates the buffer size in C_WrapKey with CKM_ECDH_AES_KEY_WRAP","id":"CVE-2026-22791","kev_date_added":null,"published":"2026-01-13"},{"cvss_score":6.2,"headline":"Path traversal in n/a","id":"CVE-2012-4455","kev_date_added":null,"published":"2012-10-10"},{"cvss_score":5.9,"headline":"Opencryptoki: timing side-channel in handling of rsa pkcs#1 v1.5 padded ciphertexts (marvin)","id":"CVE-2024-0914","kev_date_added":null,"published":"2024-01-31"},{"cvss_score":5.5,"headline":"Information disclosure in opencryptoki","id":"CVE-2021-3798","kev_date_added":null,"published":"2022-08-23"},{"cvss_score":2.9,"headline":"Path traversal in n/a","id":"CVE-2012-4454","kev_date_added":null,"published":"2012-10-10"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-04-17","vendors":["opencryptoki"]},"summary":"Attackers can trigger out-of-bounds reads in openCryptoki via malformed BER-encoded objects, potentially causing crashes or information disclosure.","url":"https://insights.sbomify.com/CVE-2026-40253/"}