Hermes bytecode OOB via int conversion for arbitrary code exec
CVE-2022-40138 Published on October 11, 2022

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.

NVD

Weakness Type

Incorrect Conversion between Numeric Types

When converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. If the resulting values are used in a sensitive context, then dangerous behaviors may occur.


Products Associated with CVE-2022-40138

Want to know whenever a new CVE is published for Facebook Hermes? stack.watch will email you.

 

Affected Versions

Facebook Hermes:

Exploit Probability

EPSS
1.22%
Percentile
78.80%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.