{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-40257 in the wild and no public exploit code.","fix":"No fix has been published for CVE-2026-40257 yet. Limit exposure of the affected software until one is available.","what":"CVE-2026-40257 is a medium-severity memory corruption vulnerability in OP-TEE optee_os, published on 6 Jul 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-40257 and fix it if it is affected.\n\nWhat it is: CVE-2026-40257 is a medium-severity memory corruption vulnerability in OP-TEE optee_os, published on 6 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-40257 in the wild and no public exploit code.\n\nAffected product: OP-TEE optee_os. 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-40257/ (Markdown: https://insights.sbomify.com/CVE-2026-40257/index.md)","id":"CVE-2026-40257","markdown":"https://insights.sbomify.com/CVE-2026-40257/index.md","name":"CVE-2026-40257","record":{"aliases":["DEBIAN-CVE-2026-40257","GHSA-75x4-j8p9-55qv","UBUNTU-CVE-2026-40257"],"analysis":{"component_type":"operating_system","fix_type":"patch","impacts":["code_execution","privilege_escalation"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"OP-TEE OS","requires_auth":"low_privilege","summary":"An off-by-one error in OP-TEE's SHA-3 implementation allows heap overflow and memory corruption, potentially leading to code execution or privilege escalation.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"op-tee","vendor":"trustedfirmware"}],"cvss":{"score":5.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"}],"description":"OP-TEE is a Trusted Execution Environment (TEE) designed as companion to a non-secure Linux kernel running on Arm; Cortex-A cores using the TrustZone technology. Starting in version 3.21.0 and prior to version 4.11.0, the ARM Crypto Extensions accelerated SHA-3 implementation has an off-by-one error that can cause a massive heap overflow that corrupts all TEE kernel memory following the hash state. This affects all platforms built with `CFG_CRYPTO_WITH_CE82=y` (ARMv8.2+ with SHA3 Crypto Extensions). Version 4.11.0 contains a patch. As a workaround, disable SHA3 Crypto Extensions with `CFG_CRYPTO_WITH_CE82=n`.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":false,"headline":"OP-TEE has SHA-3 accelerated finalize heap overflow","id":"CVE-2026-40257","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"memory_corruption","year":"2026"},"n_packages":0,"n_references":1,"next":{"headline":"Gramps Web API has Zip Slip Path Traversal in Media Archive Import","id":"CVE-2026-40258"},"packages":[],"prev":{"headline":"Weblate: Prefix-Based Repository Boundary Check Bypass via Symlink/Junction Path Prefix Collision","id":"CVE-2026-40256"},"products":["optee_os"],"published":"2026-07-06","related":[{"cvss_score":9.8,"headline":"Memory corruption in OP-TEE","id":"CVE-2019-1010292","kev_date_added":null,"published":"2019-07-16"},{"cvss_score":9.8,"headline":"Memory corruption in OP-TEE","id":"CVE-2019-1010293","kev_date_added":null,"published":"2019-07-15"},{"cvss_score":9.8,"headline":"Linaro/OP-TEE OP-TEE 3.3.0 and earlier is affected by: Buffer Overflow.","id":"CVE-2019-1010295","kev_date_added":null,"published":"2019-07-15"},{"cvss_score":9.8,"headline":"Memory corruption in OP-TEE","id":"CVE-2019-1010296","kev_date_added":null,"published":"2019-07-15"},{"cvss_score":9.8,"headline":"Memory corruption in OP-TEE","id":"CVE-2019-1010297","kev_date_added":null,"published":"2019-07-15"},{"cvss_score":9.8,"headline":"Memory corruption in OP-TEE","id":"CVE-2019-1010298","kev_date_added":null,"published":"2019-07-15"},{"cvss_score":9.1,"headline":"Information disclosure in n/a","id":"CVE-2019-25052","kev_date_added":null,"published":"2021-08-11"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"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":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-07-06","vendors":["OP-TEE"]},"summary":"An off-by-one error in OP-TEE's SHA-3 implementation allows heap overflow and memory corruption, potentially leading to code execution or privilege escalation.","url":"https://insights.sbomify.com/CVE-2026-40257/"}