CVE-2022-39218 Details
Description
The JS Compute Runtime for Fastly's Compute@Edge platform provides the environment JavaScript is executed in when using the Compute@Edge JavaScript SDK. In versions prior to 0.5.3, the `Math.random` and `crypto.getRandomValues` methods fail to use sufficiently random values. The initial value to seed the PRNG (pseudorandom number generator) is baked-in to the final WebAssembly module, making the sequence of random values for that specific WebAssembly module predictable. An attacker can use the fixed seed to predict random numbers generated by these functions and bypass cryptographic security controls, for example to disclose sensitive data encrypted by functions that use these generators. The problem has been patched in version 0.5.3. No known workarounds exist.
A vulnerability exists in the JS Compute Runtime for Fastly's Compute@Edge platform, specifically in versions 0.4.0 prior to 0.5.3. The issue arises because the `Math.random` and `crypto.getRandomValues` methods do not generate sufficiently random values. The seed for the pseudorandom number generator is embedded in the final WebAssembly module, leading to predictable sequences of random numbers for that module. This predictability allows an attacker to anticipate random values generated by these functions, potentially bypassing cryptographic protections and revealing sensitive data encrypted with these generators.
Users must upgrade to version 0.5.3 or later, where this vulnerability has been fixed. The updated version corrects the randomness methods to ensure they always use adequately random values, eliminating the predictability issue.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 23, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/fastly/js-compute-runtime/security/advisories/GHSA-cmr8-5w4c-44v8 | CVE | Third Party Advisory |
| https://github.com/fastly/js-compute-runtime/security/advisories/GHSA-cmr8-5w4c-44v8 | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-335 | Incorrect Usage of Seeds in Pseudo-Random Number Generator (PRNG) | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| fastly js-compute | < 0.5.3 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Sep 21, 2022 | Initial Analysis | [email protected] |