Skip to content

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

Merged
vvoland merged 1 commit into
docker:masterfrom
thaJeztah:bump_yaml
Nov 3, 2026
Merged

vvoland 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.

Release notes (optional)

A picture of a cute animal (not mandatory but encouraged)

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>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

The security fix correctly bumps go.yaml.in/yaml/v3 from v3.0.5 to v3.0.6. The core change — adding t[int('<')] = 'M' in resolve.go — is sound: it registers < as a hint byte so any string beginning with < is looked up in resolveMap during encoding, causing "<<" (the YAML merge key) to be forced into a quoted form and preventing key-injection attacks. Strings like "<html>" that are not in resolveMap resolve to strTag and remain unquoted, so no regression is introduced. Version annotations are consistent across vendor.mod, vendor.sum, and vendor/modules.txt (all v3.0.6).

@thaJeztah thaJeztah changed the title vendor: go.yaml.in/yaml/v3 v3.0.6 vendor: go.yaml.in/yaml/v3 v3.0.6 (security) Nov 3, 2026
@thaJeztah thaJeztah self-assigned this Nov 3, 2026
@thaJeztah
thaJeztah requested a review from vvoland November 3, 2026 11:01

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

@vvoland
vvoland merged commit e7ece56 into docker:master Nov 3, 2026
119 checks passed
@thaJeztah
thaJeztah deleted the bump_yaml branch November 3, 2026 13:28
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.

4 participants