Seroval `fromJSON`/`fromCrossJSON` denial of service via unvalidated array node lengthGHSA-wp97-x4hv-qvhp
HIGHFix: lxsmnsyc/seroval@cdcee3eGHSA-wp97-x4hv-qvhp is a high-severity (CVSS 7.5) CWE-770 vulnerability in seroval. A fix is available for seroval — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-wp97-x4hv-qvhp by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 396,966 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
serovalnpmDescription
Summary
fromJSON and fromCrossJSON did not check that an array node's element list is an array. A small crafted payload could set the length the decoder used. That length controlled how much memory was allocated and how many times the decoder looped, and it did not depend on the size of the payload.
Impact
A service that passes untrusted input to fromJSON or fromCrossJSON can be made unavailable by an unauthenticated request.
- A small payload can allocate enough memory to end the process.
- A small payload can block the thread for seconds, or without end.
This affects any framework that decodes request bodies with these functions before its own validation runs.
This issue is a bypass of the fix for GHSA-66fc-rw6m-c2q6 in 1.4.1.
Patches
Fixed in [email protected]. The deserializer now rejects any node whose element list is not an array, and throws SerovalMalformedNodeError.
Workarounds
None. Upgrade to 1.6.8.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | seroval | ≥ 1.4.1&&< 1.6.8 | 1.6.8npm install seroval@1.6.8 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for seroval, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update seroval to 1.6.8 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-wp97-x4hv-qvhp is resolved across your whole dependency graph.
Workarounds
Do not deserialise data from untrusted sources: where the format allows it, restrict deserialisation to an explicit allowlist of expected types, and prefer a data-only format (JSON, Protobuf) over one that can reconstruct arbitrary objects until you can upgrade.
Frequently Asked Questions
Is GHSA-wp97-x4hv-qvhp in your dependencies?
Find it across npm, including transitive dependencies.