What’s Vulnerable › Vulnerabilities
CVE-2022-40138
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-10-11 · updated 2026-06-17
- Weakness: CWE-681
Description
An integer conversion error in Hermes bytecode generation, prior to commit 6aa825e480d48127b480b08d13adf70033237097, could have been used to perform Out-Of-Bounds operations and subsequently execute arbitrary code. Note that this is only exploitable in cases where Hermes is used to execute untrusted JavaScript. Hence, most React Native applications are not affected.
Affected products
- Facebook Hermes: before 2022-09-27 — fixed in 2022-09-27
How to fix
Upgrade to a fixed version: Facebook Hermes 2022-09-27. Check the vendor advisory for mitigations.
References
- https://github.com/facebook/hermes/commit/6aa825e480d48127b480b08d13adf70033237097
- https://www.facebook.com/security/advisories/CVE-2022-40138
- https://github.com/facebook/hermes/commit/6aa825e480d48127b480b08d13adf70033237097
- https://www.facebook.com/security/advisories/CVE-2022-40138
Get alerted when CVE-2022-40138 or the next vulnerability affects your stack