---
id: "CVE-2026-62866"
kind: "vulnerability"
aliases: ["CVE-2026-62866", "GHSA-65gg-g7rw-6cpc", "GO-2026-6548"]
title: "Dasel: Selector lexer panics on trailing whitespace in `parseCurRune` in github.com/tomwright/dasel"
severity: "medium"
cvss: 6.2
epss: 0.00192
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.2"], "affected": ">= 3.0.0, < 3.11.2", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["dasel", "go", "package", "self-hosted"]
not_affected_if: ["dasel-v2-or-v1-only", "selectors-not-user-controlled"]
published_at: "2026-09-21T17:17:38+00:00"
first_seen_at: "2026-10-23T19:13:08+00:00"
updated_at: "2026-10-23T21:46:15+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6548", "first_seen_at": "2026-10-23T19:13:08+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-62866", "first_seen_at": "2026-10-23T19:13:43+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-62866", "first_seen_at": "2026-10-23T19:35:23+00:00"}]
---

# Dasel: Selector lexer panics on trailing whitespace in `parseCurRune` in github.com/tomwright/dasel

Dasel, a Go library and CLI for querying data structures, panics when a selector ends in trailing whitespace. An attacker who controls the selector string can crash the process that parses it.

_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.2 fixed 3.11.2

## How to check

Run `go list -m github.com/tomwright/dasel/v3` and confirm the version is below 3.11.2.
Search the code for imports of github.com/tomwright/dasel or lexer.NewTokenizer/dasel.Query that take user-supplied selectors.

## Fix

Upgrade github.com/tomwright/dasel/v3 to 3.11.2 or later.
The sources do not list a fixed version for the non-v3 module paths, so unknown.

## Timeline

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

## 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.2, selector/lexer/tokenize.go parseCurRune advances the input index across trailing whitespace and then reads the source at the exhausted index without an end-of-input check. A selector ending in whitespace, including input passed through lexer.NewTokenizer(...).Tokenize() or dasel.Query, can therefore cause an index-out-of-range panic and terminate the process. This issue is fixed in version 3.11.2.

---

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