{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "3.21.0"
                  },
                  {
                    "fixed": "4.11.0"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              }
            ]
          },
          "events": [
            {
              "introduced": "e8abbcfbdf63437a640d5fd87b7e191caab6445e"
            },
            {
              "fixed": "f54190f22611dd5ad5d22546fd4209aa100f56bd"
            }
          ],
          "repo": "https://github.com/op-tee/optee_os",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-75x4-j8p9-55qv"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-787"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40257.json"
  },
  "details": "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`.",
  "id": "CVE-2026-40257",
  "modified": "2026-10-21T02:30:23.788635728Z",
  "published": "2026-07-06T16:26:20.379Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40257.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/OP-TEE/optee_os/security/advisories/GHSA-75x4-j8p9-55qv"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40257"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "OP-TEE has SHA-3 accelerated finalize heap overflow"
}