SecurityContext

CVE-2022-40138: Hermes - Buffer Overflow

  • Cve: CVE-2022-40138
  • Name: Hermes - Buffer Overflow
  • 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.
  • Impact: Attackers can execute arbitrary code if Hermes executes untrusted JavaScript, potentially leading to full system compromise.
  • Remediation: Update Hermes to commit 6aa825e480d48127b480b08d13adf70033237097 or later versions.
  • Vulnerability type: out_of_bounds_rw
  • Vulnerability impact: remote_code_execution
  • Requirement type: user_interaction
  • Requirements: Hermes must execute untrusted JavaScript
  • Labels source: projectdiscovery
  • Severity: critical
  • Cvss score: 9.8
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.01212
  • Epss percentile: 0.69265
  • Assignee: [email protected]
  • Published at: 2022-10-11T02:15:08Z
  • Age in days: 1505
  • Modified at: 2026-06-17T05:01:00Z
  • Patch available: yes
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-40138
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: hackerone

Cwe

IdName
CWE-681Incorrect Conversion between Numeric Types

References

UrlSourceTags
https://github.com/facebook/hermes/commit/6aa825e480d48127b480b08d13adf70033237097nvdPatch, Third Party Advisory
https://www.facebook.com/security/advisories/CVE-2022-40138nvdVendor Advisory

Products

ProductAffectedPlatform boundSourcesUrl
facebook:hermes< 2022-09-27nonvd/v1/products/facebook/hermes

Projects

RepositoryLink kindsIndexedUrl
facebook/hermescommit, fixyes/v1/repositories/facebook/hermes

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts