Skip to content

vendor: go.yaml.in/yaml/v3 v3.0.6 (security) - #4182

Merged
crazy-max merged 1 commit into
docker:masterfrom
thaJeztah:bump_yaml
Nov 3, 2026
Merged

crazy-max merged 1 commit into
docker:masterfrom
thaJeztah:bump_yaml

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

resolve: hint-class literal merge-key string "<<" so it's quoted on encode

full diff: yaml/go-yaml@v3.0.5...v3.0.6

So is this a REAL security fix for v3?

YES, absolutely! Here's why:

  1. The vulnerability is real — A map key with literal value "<<" gets encoded unquoted, then decoded as a YAML merge directive, causing keys to be injected into the wrong scope.
  2. v3 is vulnerable — v3 doesn't have the fix that v4 has, so the attack works.
  3. The PR fixes it — Adding t[int('<')] = 'M' registers the hint byte, so "<<" gets quoted on encode, preventing misinterpretation on decode.
  4. It's security-critical — While the PR description is matter-of-fact, this prevents key injection attacks where an attacker-controlled map value could splice their keys into your data structure.

Your original concern was valid: You were right to wonder if it was a real security issue or just paperwork. It's very real — but it's been quietly fixed in v4, and now being ported to v3's frozen maintenance branch.

resolve: hint-class literal merge-key string "<<" so it's quoted on encode

full diff: yaml/go-yaml@v3.0.5...v3.0.6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@crazy-max
crazy-max merged commit 359d318 into docker:master Nov 3, 2026
164 checks passed
@thaJeztah
thaJeztah deleted the bump_yaml branch November 3, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants