CVE-2022-40138 Integer overflow in Hermes

Critical 9.8 Published Updated

An integer conversion error in Hermes allows arbitrary code execution when processing untrusted JavaScript, primarily affecting React Native apps using this engine.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2022-40138?

CVE-2022-40138 is a critical vulnerability in Facebook Hermes, published on 11 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-681

Which versions are affected by CVE-2022-40138?

It affects 1 product.

Products include Facebook Hermes.

How do I fix CVE-2022-40138?

No fix has been published for CVE-2022-40138 yet. Limit exposure of the affected software until one is available.

Is CVE-2022-40138 being exploited?

There is no known exploitation of CVE-2022-40138 in the wild and no public exploit code.

Sources

Also known as GHSA-qg8w-6wvf-6vp6.

Is CVE-2022-40138 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free