CVE-2020-1914
JavaScript vulnerability analysis and mitigation

Overview

A logic vulnerability was discovered in Facebook Hermes prior to commit b2021df620824627f5a8c96615edbd1eb7fdddfc that affects the handling of the SaveGeneratorLong instruction. This vulnerability allows attackers to potentially read out of bounds or theoretically execute arbitrary code via crafted JavaScript. Importantly, this vulnerability is only exploitable in cases where Hermes is used to execute untrusted JavaScript, meaning most React Native applications are not affected (NVD).

Technical details

The vulnerability stems from a logic error in handling the SaveGeneratorLong instruction, where it would accidentally jump to the wrong next instruction based on how long SaveGenerator was. The issue was fixed by creating a callout function to handle the common case and managing the dispatch within each case of the interpreter loop. The vulnerability has been assigned a CVSS v3.1 Base Score of 9.8 (CRITICAL) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

The vulnerability could allow attackers to read out of bounds memory or potentially execute arbitrary code through specially crafted JavaScript. However, the impact is limited to applications that specifically allow the execution of untrusted JavaScript code within the Hermes environment (NVD).

Mitigation and workarounds

The vulnerability was fixed in commit b2021df620824627f5a8c96615edbd1eb7fdddfc. The fix involves modifying how the SaveGeneratorLong instruction is handled by implementing a proper dispatch mechanism within the interpreter loop. Users should update to a version of Hermes that includes this commit (Github Commit).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management