CVE-2023-28081

A bytecode optimization bug in Hermes prior to commit e6ed9c1a4b02dc219de1648f44cd808a56171b81 could be used to cause an use-after-free and obtain arbitrary…

Critical · published May 18, 2023

CVSS v3.1
9.8
EPSS
1%
Percentile
59.0
In the wild
Unconfirmed
What it is

🚨 A sneaky bytecode optimization bug could let attackers execute arbitrary code in Hermes, and it’s as critical as it gets with a CVSS score of 9.8! 🔥 Think of Hermes like a busy kitchen where chefs are constantly preparing meals. If a chef accidentally leaves a utensil on the counter, it can be picked up by anyone — in this case, that’s the untrusted JavaScript injecting malicious code instead of a delicious dish! An attacker could exploit this vulnerability by executing arbitrary code, potentially taking full control of the application. While many React Native apps are safe due to their trusted environment, if your application executes untrusted JavaScript, the consequences could be absolutely devastating!

Put simply

Think of Hermes like a busy kitchen where chefs are constantly preparing meals. If a chef accidentally leaves a utensil on the counter, it can be picked up by anyone — in this case, that’s the untrusted JavaScript injecting malicious code instead of a delicious dish! This vulnerability arises from an optimization flaw in Hermes that can lead to a use-after-free condition, allowing an attacker to craft a payload that executes arbitrary code directly within the application. It's a serious issue when untrusted JavaScript is involved.

What to do

An attacker could exploit this vulnerability by executing arbitrary code, potentially taking full control of the application. While many React Native apps are safe due to their trusted environment, if your application executes untrusted JavaScript, the consequences could be absolutely devastating! To mitigate this risk, ensure you update Hermes to the latest version that includes the fix from commit e6ed9c1a4b02dc219de1648f44cd808a56171b81. Additionally, review your application's JavaScript execution contexts to avoid running untrusted code. Don't leave any surprises on the counter! You’ve got this! Follow these steps, and you’ll lock it down like a security hero! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00891 · 59.0th percentile
Published
2023-05-18T21:26Z
EPSS history
Timeline
  • 18 MAY 21:26Z
    A bytecode optimization bug in Hermes prior to commit e6ed9c1a4b02dc219de1648f44cd808a56171b81 could be used to cause an use-after-free and obtain arbitrary…
    cvelistv5