Skip to main content

CVE-2025-46687: CWE-770 Allocation of Resources Without Limits or Throttling in QuickJS Project QuickJS

Medium
VulnerabilityCVE-2025-46687cvecve-2025-46687cwe-770
Published: Sun Apr 27 2025 (04/27/2025, 00:00:00 UTC)
Source: CVE
Vendor/Project: QuickJS Project
Product: QuickJS

Description

quickjs-ng through 0.9.0 has a missing length check in JS_ReadString for a string, leading to a heap-based buffer overflow. QuickJS before 2025-04-26 is also affected.

AI-Powered Analysis

AILast updated: 06/24/2025, 19:51:10 UTC

Technical Analysis

CVE-2025-46687 is a medium-severity vulnerability affecting the QuickJS JavaScript engine, specifically versions up to 0.9.0 and any versions before 2025-04-26. The root cause is a missing length check in the JS_ReadString function, which processes strings within the engine. This flaw leads to a heap-based buffer overflow, categorized under CWE-770 (Allocation of Resources Without Limits or Throttling). Essentially, the vulnerability arises because the QuickJS engine does not properly validate the length of input strings before allocating memory and copying data, allowing an attacker to overflow the heap buffer. This can corrupt memory, potentially leading to arbitrary code execution, denial of service, or other unpredictable behavior. The CVSS 3.1 base score is 5.6, reflecting a medium severity level. The vector indicates that exploitation requires local access (AV:L), high attack complexity (AC:H), no privileges (PR:N), and no user interaction (UI:N). The scope is changed (S:C), meaning the vulnerability can affect resources beyond the initially vulnerable component. The impact affects confidentiality, integrity, and availability to a low degree (C:L/I:L/A:L). No known exploits are currently reported in the wild, and no patches have been officially released at the time of publication. QuickJS is a lightweight JavaScript engine often embedded in IoT devices, embedded systems, and some software products requiring scripting capabilities. The vulnerability's exploitation requires local access, which limits remote exploitation but still poses a risk in environments where untrusted code or data can be processed locally by QuickJS. Given the nature of the flaw, attackers could craft malicious input strings to trigger the overflow, potentially leading to memory corruption and further compromise of the host system or application embedding QuickJS.

Potential Impact

For European organizations, the impact of CVE-2025-46687 depends heavily on the deployment of QuickJS within their infrastructure. Organizations using QuickJS in embedded devices, IoT systems, or software products that process untrusted JavaScript code locally are at risk. Successful exploitation could lead to local privilege escalation, arbitrary code execution, or denial of service, compromising system integrity and availability. This is particularly concerning for critical infrastructure sectors such as manufacturing, energy, and telecommunications, where embedded systems are prevalent. Additionally, sectors relying on embedded scripting for automation or control (e.g., automotive, industrial control systems) could face operational disruptions. Although remote exploitation is not feasible without local access, insider threats or malware that gains initial foothold could leverage this vulnerability to escalate privileges or move laterally. The medium severity score suggests moderate risk, but the changed scope indicates that the vulnerability could impact components beyond the QuickJS engine itself, potentially affecting the confidentiality and integrity of sensitive data processed by affected applications. European organizations with stringent regulatory requirements (e.g., GDPR) must consider the risk of data exposure or service disruption due to this vulnerability.

Mitigation Recommendations

1. Immediate mitigation involves updating QuickJS to a version released after 2025-04-26 that addresses this vulnerability once available. Since no official patches are currently published, organizations should monitor vendor advisories closely. 2. Implement strict input validation and sanitization on all data processed by QuickJS, especially untrusted or external inputs, to prevent malicious strings from triggering the overflow. 3. Employ sandboxing and process isolation techniques for applications embedding QuickJS to limit the impact of potential exploitation. 4. Restrict local access to systems running QuickJS to trusted users only, minimizing the risk of local exploitation. 5. Use memory protection mechanisms such as Address Space Layout Randomization (ASLR), Data Execution Prevention (DEP), and stack canaries to reduce the likelihood of successful exploitation. 6. Conduct code audits and penetration testing focused on components using QuickJS to identify potential exploitation vectors. 7. For embedded devices, ensure secure firmware update mechanisms are in place to deploy patches promptly once available. 8. Monitor system logs and behavior for signs of memory corruption or crashes related to QuickJS processes, which may indicate exploitation attempts.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
mitre
Date Reserved
2025-04-27T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d983dc4522896dcbef6d6

Added to database: 5/21/2025, 9:09:17 AM

Last enriched: 6/24/2025, 7:51:10 PM

Last updated: 8/10/2025, 3:46:32 PM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats