CVE-2026-59168: Dasel: Unbounded recursion in JSON and XML readers causes unrecoverable stack-overflow DoS
Dasel is a command-line tool and library for querying, modifying, and transforming data structures. From 3.0.0 until 3.11.1, parsing/json/jsonreader.go decodeValue, decodeObject, and decodeArray, and parsing/xml/reader.go parseElement, recurse once per input nesting level without a depth guard. Deeply nested attacker-controlled JSON or XML supplied through parsing.Format(...).NewReader(...).Read(data), the command-line interface, or the parse selector function can exhaust the Go goroutine stack and raise an unrecoverable fatal error that terminates the entire process. The XML input-size limit does not prevent depth exhaustion, and defer or recover cannot intercept the failure. This issue is fixed in version 3.11.1.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
daselto a version that resolves this vulnerability.Fixed in 3.11.1
Event History
Frequently Asked Questions
Which deployments are realistically exposed to this denial of service?
Any application, service, or command-line workflow using affected Dasel versions that parses attacker-controlled JSON or XML is exposed. The affected parsing paths include Format(...).NewReader(...).Read(data), the command-line interface, and the parse selector function.
What must an attacker provide to trigger the issue?
An attacker needs to supply JSON or XML with sufficiently deep nesting to an affected parser. No privileges or user interaction are required according to the provided CVSS vector.
Does limiting XML input size prevent exploitation?
No. The XML input-size limit does not prevent depth-based stack exhaustion, because the issue is caused by nesting depth rather than total input size.
Can an application recover from an attempted exploit with defer or recover?
No. Exhausting the Go goroutine stack causes an unrecoverable fatal error that terminates the entire process, and defer or recover cannot intercept it.
What version fixes the issue?
Upgrade Dasel to version 3.11.1. Versions from 3.0.0 until 3.11.1 are affected.