# CVE-2021-24044: Facebook Hermes type confusion via async/yield in getters/setters

Source: https://junglewise.ai/threats/cve-2021-24044-facebook-hermes-type-confusion-via-async-yield-in-getters-setters  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-01-16. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2021-24044 · Severity: low · CVSS 3.1 · Published 2022-01-16

Hermes is a JavaScript engine used to power React Native applications. A type confusion vulnerability allows attackers to crash the engine or potentially execute arbitrary code by supplying specially crafted JavaScript code that misuses async and yield keywords in getter/setter functions, leading to memory safety violations.

Technologies: [hermes-engine (npm)](https://junglewise.ai/threats/technologies/hermes-engine). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2021-24044 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-24044 being exploited in the wild.

**How severe is CVE-2021-24044?** Low severity, with a CVSS score of 3.1, published 16 January 2022.

**Which products and versions are affected?** hermes-engine (npm) SEMVER:introduced=0,fixed=0.10.0.

**Is there a fix for CVE-2021-24044?** Yes. hermes-engine (npm): upgrade to 0.10.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2021-24044 attacked?** It is attacked over the network.

**Am I affected by CVE-2021-24044?** Check whether you run hermes-engine (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- hermes-engine (npm): upgrade to 0.10.0 or later

  ```sh
  npm install hermes-engine@0.10.0
  ```


## Technical details

This vulnerability is a type confusion (CWE-843) in Hermes' handling of async/generator syntax in non-async/non-generator getter and setter functions. When invalid JavaScript code attempts to use await or yield in these contexts, Hermes incorrectly invokes generator functions without proper type validation, resulting in a segmentation fault due to memory safety violations. The attack requires no authentication and is remotely exploitable via network-delivered JavaScript code (e.g., web views, RN applications). Attackers can achieve denial of service through crash, with a low but plausible probability of remote code execution. The vulnerability is resolved in Hermes v0.10.0 and later.

## Affected products

- Facebook Hermes prior to 0.10.0

## Identifiers

- CVE-2021-24044
- GHSA-7mhc-prgv-r3q4

## Timeline

- 2022-01-16: disclosed
- 2022-01-16: patched: Fixed in v0.10.0

## References

- [https://github.com/facebook/hermes](https://github.com/facebook/hermes)

## Related threats

- [Meta Hermes JavaScript engine use after free](https://junglewise.ai/threats/cve-2021-24037-meta-hermes-javascript-engine-use-after-free)
- [Meta Hermes out-of-bounds read in JavaScript interpreter](https://junglewise.ai/threats/cve-2020-1915-meta-hermes-out-of-bounds-read-in-javascript-interpreter)
- [Facebook Hermes out-of-bounds read in SaveGeneratorLong](https://junglewise.ai/threats/cve-2020-1914-facebook-hermes-out-of-bounds-read-in-savegeneratorlong)
- [Facebook Hermes signed to unsigned conversion error](https://junglewise.ai/threats/cve-2020-1913-facebook-hermes-signed-to-unsigned-conversion-error)
- [Facebook Hermes out-of-bounds read/write in generator compilation](https://junglewise.ai/threats/cve-2020-1912-facebook-hermes-out-of-bounds-read-write-in-generator-compilation)
