CVE-2024-13903
High · 7.5CVSS
7.5
EPSS
0.7%
Published
Mar 21, 2025
CISA due date
—
Cloudanix analysis
A flaw in a JavaScript engine lets attackers who can reach it remotely crash the program or potentially take control of it, so organizations should update the affected software right away.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Other
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Stack-based buffer overflow triggered in the JS_GetRuntime function within quickjs.c of the qjs component when handling manipulated input.
Why it matters to the business
Remote attackers could crash the process or execute arbitrary code, leading to service disruption or compromise in any application embedding this JavaScript engine; prevalence in downstream projects increases exposure surface across development and runtime environments.
How an attack unfolds
An attacker crafts malicious input and sends it remotely to a vulnerable QuickJS instance; the input reaches JS_GetRuntime, overflows the stack buffer, and allows control-flow hijacking or denial of service.
How to fix it
Upgrade quickjs-ng/quickjs to version 0.9.0 or apply commit 99c02eb45170775a9a679c32b45dd4000ea67aff (or the listed equivalent fixed commit 670492dd342dace0bb7bd6fbfbde8f0bc5651224).
How to confirm the fix worked
Confirm the installed QuickJS version is 0.9.0 or newer; verify the patch commit is present in the source; recompile and test that JS_GetRuntime no longer overflows on the original malformed input.
Typical attack path
- Identify a remotely reachable service or binary using vulnerable QuickJS <= 0.8.0
- Craft and transmit input that manipulates parameters to JS_GetRuntime
- Trigger the stack-based overflow to corrupt return addresses or adjacent stack data
- Achieve code execution or application crash
How to detect it
Review application logs and crash dumps for unexpected terminations or stack corruption around QuickJS runtime calls; inspect network traffic for unusual payloads targeting JavaScript evaluation endpoints.
What your security team should do
- Immediately upgrade all instances of quickjs-ng/quickjs to the fixed version
- Scan build pipelines and dependency manifests for references to QuickJS <= 0.8.0
- Add version pinning and automated dependency checks to prevent reintroduction
- Monitor upstream QuickJS releases for any follow-on security updates
The record
A vulnerability was found in quickjs-ng QuickJS up to 0.8.0. It has been declared as problematic. Affected by this vulnerability is the function JS_GetRuntime of the file quickjs.c of the component qjs. The manipulation leads to stack-based buffer overflow. The attack can be launched remotely. Upgrading to version 0.9.0 is able to address this issue. The patch is named 99c02eb45170775a9a679c32b45dd4000ea67aff. It is recommended to upgrade the affected component.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:13 | quickjs | 0 | No fix |
| Debian:14 | quickjs | 0 | No fix |
| Ubuntu:24.04:LTS | quickjs | 0 | No fix |
| Ubuntu:24.10 | quickjs | 0 | No fix |