CVE-2022-39218
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.
Weakness
- CWE-335: Incorrect Usage of Seeds in Pseudo-Random Number Generator (PRNG)
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | yes |
| Technical impact | partial |
| Scored | 2025-04-23 |
Timeline
- 2022-09-20Published by the CNA19:50 UTC
- 2022-09-20GitHub advisory published (GHSA-cmr8-5w4c-44v8)same day
- 2025-04-23CISA SSVC decision recorded946 days after publication
Exploit and advisory records
GitHub advisory GHSA-cmr8-5w4c-44v8, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| npm @fastly/js-compute | from 0.4.0 before 0.5.3 | 0.5.3 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| fastly js-compute | before 0.5.3fixed in 0.5.3 | 0.5.3 |
References
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2022-39218'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2022-39218'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2022-39218'curl 'https://api.contrastcyber.com/cve_products/CVE-2022-39218'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).