CVE-2022-40138
NixOS vulnerability analysis and mitigation

Overview

An integer conversion error was discovered in Hermes bytecode generation prior to commit 6aa825e480d48127b480b08d13adf70033237097. This vulnerability could potentially be exploited to perform Out-Of-Bounds operations and subsequently execute arbitrary code. Notably, this vulnerability is only exploitable in cases where Hermes is used to execute untrusted JavaScript, meaning most React Native applications are not affected (CVE Mitre).

Technical details

The vulnerability stems from an integer conversion error in the bytecode generation process of the Hermes JavaScript engine. The issue was specifically related to the handling of environment access in deeply nested scopes, where integer overflow could occur during bytecode generation (Github Commit).

Impact

If successfully exploited, this vulnerability could allow attackers to perform Out-Of-Bounds operations and potentially execute arbitrary code. However, the impact is limited as it requires the application to execute untrusted JavaScript code through Hermes (CVE Mitre).

Mitigation and workarounds

The vulnerability was fixed in commit 6aa825e480d48127b480b08d13adf70033237097. Users should update their Hermes installation to a version that includes this fix (Github Commit).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-61619HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61618HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61617HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61610HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61609HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025

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