{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-46152 exists.","fix":"No fix has been published for CVE-2022-46152 yet. Limit exposure of the affected software until one is available.","what":"CVE-2022-46152 is a high-severity memory corruption vulnerability in OP-TEE optee_os, published on 29 Nov 2022. 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-2022-46152 and fix it if it is affected.\n\nWhat it is: CVE-2022-46152 is a high-severity memory corruption vulnerability in OP-TEE optee_os, published on 29 Nov 2022. 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-2022-46152 exists.\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-2022-46152/ (Markdown: https://insights.sbomify.com/CVE-2022-46152/index.md)","id":"CVE-2022-46152","markdown":"https://insights.sbomify.com/CVE-2022-46152/index.md","name":"CVE-2022-46152","record":{"aliases":["GHSA-65w8-6mrg-52g7"],"analysis":{"component_type":"operating_system","fix_type":"upgrade","impacts":["privilege_escalation","code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Trusted Execution Environment","requires_auth":"high_privilege","summary":"A normal-world attacker can exploit an array index validation flaw in OP-TEE to achieve local privilege escalation into the secure world.","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":8.2,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-129","name":"Improper Validation of Array Index"}],"description":"OP-TEE Trusted OS is the secure side implementation of OP-TEE project, a Trusted Execution Environment. Versions prior to 3.19.0, contain an Improper Validation of Array Index vulnerability. The function `cleanup_shm_refs()` is called by both `entry_invoke_command()` and `entry_open_session()`. The commands `OPTEE_MSG_CMD_OPEN_SESSION` and `OPTEE_MSG_CMD_INVOKE_COMMAND` can be executed from the normal world via an OP-TEE SMC. This function is not validating the `num_params` argument, which is only limited to `OPTEE_MSG_MAX_NUM_PARAMS` (127) in the function `get_cmd_buffer()`. Therefore, an attacker in the normal world can craft an SMC call that will cause out-of-bounds reading in `cleanup_shm_refs` and potentially freeing of fake-objects in the function `mobj_put()`. A normal-world attacker with permission to execute SMC instructions may exploit this flaw. Maintainers believe this problem permits local privilege escalation from the normal world to the secure world. Version 3.19.0 contains a fix for this issue. There are no known workarounds.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":"2023-11-27","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2023-11-27T12:07:07Z","kind":"github_poc","ref":"https://github.com/0xbbdd/CVE-2022-46152","stars":0,"title":"CVE-2022-46152: Improper Validation of Array Index in the `cleanup_shm_refs' function."}],"tier":"weaponised"},"has_fix":false,"headline":"OP-TEE Trusted OS vulnerable to Improper Validation of Array Index in the cleanup_shm_refs function","id":"CVE-2022-46152","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"memory_corruption","year":"2022"},"n_packages":0,"n_references":4,"next":{"headline":"Routes exposed with an empty TLSOption in traefik","id":"CVE-2022-46153"},"packages":[],"prev":{"headline":"Reflected XSS","id":"CVE-2022-46151"},"products":["optee_os"],"published":"2022-11-29","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)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-22","vendors":["OP-TEE"]},"summary":"A normal-world attacker can exploit an array index validation flaw in OP-TEE to achieve local privilege escalation into the secure world.","url":"https://insights.sbomify.com/CVE-2022-46152/"}