CVE-2023-48184
Low · 3.9CVSS
3.9
EPSS
0.3%
Published
Apr 23, 2024
CISA due date
—
Cloudanix analysis
A flaw in a JavaScript engine can make programs using complex functions crash or behave unpredictably.
- Exploitation
- Adjacent Network
- Attacker needs
- High Privilege
- Complexity
- High
- Impact
- Other
- Component
- Library
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Incorrect garbage collection of async functions with closures triggers a use-after-free condition in JS_FreeValueRT, resulting in a dangling pointer and potential memory corruption within the QuickJS engine.
Why it matters to the business
Applications relying on QuickJS may experience instability, crashes, or limited exploitation that compromises script execution integrity, increasing operational risk in embedded, serverless, or browser-like environments with high prevalence of JavaScript dependencies.
How an attack unfolds
An attacker crafts JavaScript containing async functions that capture closures, supplies it to the QuickJS runtime, and triggers execution paths that force garbage collection at the wrong time, leaving a freed object referenced and enabling memory manipulation.
How to fix it
Upgrade QuickJS to a build containing commit 7414e5f or later that corrects garbage collection handling for async functions with closures.
How to confirm the fix worked
Confirm the runtime commit or version includes 7414e5f, execute targeted test cases with async closures under memory pressure, and review engine source for the corrected collection logic.
Typical attack path
- Supply malicious JavaScript payload to QuickJS runtime
- Invoke async functions that utilize closures
- Induce garbage collection during execution
- Reference the dangling pointer created by incorrect collection
- Leverage use-after-free for corruption or control-flow influence
How to detect it
Monitor process logs and crash reports for QuickJS memory errors or segmentation faults during JavaScript execution involving async patterns; inspect heap dumps for unexpected freed-object accesses.
What your security team should do
- Apply the 7414e5f fix across all QuickJS deployments immediately given the 906-day exposure window
- Inventory downstream packages and dependents that embed QuickJS
- Add regression tests for async function closure scenarios in continuous integration
The record
QuickJS before 7414e5f has a quickjs.h JS_FreeValueRT use-after-free because of incorrect garbage collection of async functions with closures.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:13 | quickjs | 0 | 2024.01.13-1 |
| Ubuntu:24.04:LTS | quickjs | 0 | No fix |
| Ubuntu:24.10 | quickjs | 0 | 2024.01.13-4 |
| Ubuntu:Pro:24.04:LTS | quickjs | 0 | 2021.03.27-1ubuntu0.1~esm1 |
Related vulnerabilities
- CVE-2024-13903 A vulnerability was found in quickjs-ng QuickJS up to 0.8.0. Also affects quickjs
- CVE-2024-33263 QuickJS commit 3b45d15 was discovered to contain an Assertion Failure via… Also affects quickjs
- CVE-2026-109618 PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort… CWE-416
- CVE-2026-109619 PHP has various global state that temporarily points into request memory. CWE-416
- CVE-2026-112402 Pillow is a Python imaging library. CWE-416
- CVE-2026-112396 Pillow is a Python imaging library. CWE-416
- CVE-2025-55654 A use-after-free in the gf_filter_pid_get_packet function (filter_core/filter_pid.c) of… CWE-416
- CVE-2026-17591 A flaw was found in libarchive. CWE-416