---
id: "CVE-2026-59168"
kind: "vulnerability"
aliases: ["CVE-2026-59168", "GHSA-cqxr-jxr2-85pq", "GO-2026-6549"]
title: "Dasel: Unbounded recursion in JSON and XML readers causes unrecoverable stack-overflow DoS in github.com/tomwright/dasel"
severity: "medium"
cvss: 6.2
epss: 0.0013
exploited: false
status: "open"
category: "package"
products: [{"name": "github.com/tomwright/dasel", "fixed": [], "affected": "all versions", "ecosystem": "go"}, {"name": "github.com/tomwright/dasel/v2", "fixed": [], "affected": "all versions", "ecosystem": "go"}, {"name": "github.com/tomwright/dasel/v3", "fixed": ["3.11.1"], "affected": ">= 3.0.0, < 3.11.1", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["cli", "dasel", "go", "package", "self-hosted"]
not_affected_if: ["dasel-v2-or-v1-only", "no-untrusted-json-or-xml", "trusted-input-only"]
published_at: "2026-09-21T17:17:36+00:00"
first_seen_at: "2026-10-23T19:13:08+00:00"
updated_at: "2026-10-23T21:46:14+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6549", "first_seen_at": "2026-10-23T19:13:08+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-59168", "first_seen_at": "2026-10-23T19:13:43+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-59168", "first_seen_at": "2026-10-23T19:35:23+00:00"}]
---

# Dasel: Unbounded recursion in JSON and XML readers causes unrecoverable stack-overflow DoS in github.com/tomwright/dasel

Dasel, a Go command-line tool and library for querying and transforming JSON, XML and other data, recurses once per nesting level when parsing JSON and XML with no depth limit. Deeply nested attacker-supplied input exhausts the goroutine stack and crashes the whole process, which is a denial of service.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:github.com/tomwright/dasel affected all versions fixed ?
- go:github.com/tomwright/dasel/v2 affected all versions fixed ?
- go:github.com/tomwright/dasel/v3 affected >= 3.0.0, < 3.11.1 fixed 3.11.1

## How to check

Run `go list -m github.com/tomwright/dasel/v3` and check whether the version is >= 3.0.0 and < 3.11.1.
If you call dasel as a library, search your code for parsing.Format(...).NewReader(...) or the parse selector function applied to untrusted input.

## Fix

Upgrade github.com/tomwright/dasel/v3 to 3.11.1 or later.

## Timeline

- 2026-10-23T19:13:08+00:00 govuln https://pkg.go.dev/vuln/GO-2026-6549
- 2026-10-23T19:13:43+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-59168
- 2026-10-23T19:35:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-59168

## From the sources

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/json_reader.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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
