CVE-2024-3862
NoneCVSS
—
EPSS
0.4%
Published
Apr 16, 2024
CISA due date
—
Cloudanix analysis
A bug in the scripting engine's memory handling could let attackers reach unset memory areas, risking crashes or security problems in browsers and related software.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Theoretical
- Impact
- Other
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
The MarkStack assignment operator in the JavaScript engine could access uninitialized memory if used in a self-assignment scenario, resulting in memory corruption.
Why it matters to the business
This can cause application instability, crashes, or potential code execution in environments running affected JavaScript or WebAssembly engines, increasing operational risk and remediation urgency for downstream dependents.
How an attack unfolds
An attacker supplies crafted JavaScript that triggers a self-assignment on the MarkStack, causing the engine to read from uninitialized memory which may be leveraged to corrupt state or achieve code execution.
How to fix it
Upgrade bytecodealliance/wasmtime to the fixed commit 666c2554ea0e1728c35aa41178cf235920db888a; for Firefox-based deployments ensure version 125 or later is deployed.
How to confirm the fix worked
Confirm the running binary or package reports the fixed commit hash or version 125+, and test that self-assignment operations no longer trigger memory errors under fuzzing or unit tests.
Typical attack path
- Deliver malicious JavaScript or WebAssembly content to the target engine
- Trigger MarkStack self-assignment code path
- Read or corrupt uninitialized memory
- Escalate to denial of service or arbitrary code execution
How to detect it
Monitor process crash logs and memory sanitizer reports for patterns involving MarkStack or assignment operations; review application logs for unexpected memory access violations after JavaScript execution.
What your security team should do
- Apply the fixed wasmtime commit or Firefox 125+ immediately across all instances
- Scan build pipelines and dependency manifests for the vulnerable versions
- Enable memory safety mitigations such as ASAN in testing environments until patches are validated
The record
The MarkStack assignment operator, part of the JavaScript engine, could access uninitialized memory if it were used in a self-assignment. This vulnerability affects Firefox < 125.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:18.04:LTS | mozjs38 | 0 | No fix |
| Ubuntu:18.04:LTS | mozjs52 | 0 | No fix |
| Ubuntu:20.04:LTS | firefox | 0 | 125.0.2+build1-0ubuntu0.20.04.2 |
| Ubuntu:20.04:LTS | mozjs52 | 0 | No fix |
| Ubuntu:20.04:LTS | mozjs68 | 0 | No fix |
| Ubuntu:22.04:LTS | mozjs102 | 0 | No fix |
| Ubuntu:22.04:LTS | mozjs78 | 0 | No fix |
| Ubuntu:22.04:LTS | mozjs91 | 0 | No fix |
| Ubuntu:24.04:LTS | mozjs102 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | mozjs38 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | mozjs52 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | mozjs52 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | mozjs68 | 0 | No fix |
| Ubuntu:Pro:22.04:LTS | mozjs78 | 0 | No fix |
| Ubuntu:Pro:24.04:LTS | mozjs102 | 0 | No fix |
| openSUSE:Tumbleweed | MozillaFirefox | 0 | 125.0.2-1.1 |
| openSUSE:Tumbleweed | firefox-esr | 0 | 128.5.1-1.1 |
Related vulnerabilities
- CVE-2025-0243 Memory safety bugs present in Firefox 133, Thunderbird 133, Firefox ESR 128.5, and… Also affects mozjs38
- CVE-2025-0237 The WebChannel API, which is used to transport various information across processes, did… Also affects mozjs38
- CVE-2025-0238 Assuming a controlled failed memory allocation, an attacker could have caused a… Also affects mozjs38
- CVE-2025-0240 Parsing a JavaScript module as JSON could, under some circumstances, cause… Also affects mozjs38
- CVE-2025-0239 When using Alt-Svc, ALPN did not properly validate certificates when the original server… Also affects mozjs38
- CVE-2025-0241 When segmenting specially crafted text, segmentation would corrupt memory leading to a… Also affects mozjs38
- CVE-2025-0242 Memory safety bugs present in Firefox 133, Thunderbird 133, Firefox ESR 115.18, Firefox… Also affects mozjs38
- CVE-2024-11704 A double-free issue could have occurred in `sec_pkcs7_decoder_start_decrypt()` when… Also affects mozjs38