Skip to content

Security: fix yaml Uncontrolled Recursion vulnerabilities#3362

Closed
sh0ji wants to merge 3 commits into
mainfrom
fix/security-yaml-uncontrolled-recursion-20260529
Closed

Security: fix yaml Uncontrolled Recursion vulnerabilities#3362
sh0ji wants to merge 3 commits into
mainfrom
fix/security-yaml-uncontrolled-recursion-20260529

Conversation

@sh0ji
Copy link
Copy Markdown
Member

@sh0ji sh0ji commented May 29, 2026

Note

This PR was opened by Claude Code running the security-fixer agent. The listed author did not write or manually review these changes.

Security Fix — yaml (Uncontrolled Recursion)

Issues Fixed

ID Type Severity Title
SNYK-JS-YAML-15765520 SCA Medium Uncontrolled Recursion in yaml@1.10.2
SNYK-JS-JSYAML-13961110 SCA Medium Prototype Pollution in js-yaml@4.1.0

CVEs Resolved

Changes

Added two Yarn resolutions entries in package.json:

  • "cosmiconfig": "^8.0.0" — upgrades cosmiconfig from v7 to v8, which switches from the vulnerable yaml@1.10.2 to js-yaml. Chain: @emotion/react/@emotion/styled → @emotion/babel-plugin → babel-plugin-macros → cosmiconfig@7 → yaml@1.10.2.
  • "js-yaml": ">=4.1.1" — cosmiconfig@8 depends on js-yaml@4.1.0 which has Prototype Pollution; this resolution pins it to the patched 4.1.1.

Strategy (SCA)

Strategy D — Yarn resolutions override. Breakability risk: low — cosmiconfig v7→v8 is API-compatible; js-yaml 4.1.1 is a patch-only bump.

Validation

  • Snyk re-scan passes (0 issues in main project)
  • Tests / lint — pre-existing failures confirmed on baseline, unrelated to this change

Run Metrics

Phase Duration
Scan 2m 10s
Fix 1m 49s
Validate 4m 35s
Total 9m 16s

Model: claude-sonnet-4-6 · Est. cost: ~$0.55

🤖 Generated with security-fixer

sh0ji and others added 2 commits May 29, 2026 15:16
…solution

Forces cosmiconfig to ^8.0.0 via yarn resolutions, replacing yaml@1.10.2
(SNYK-JS-YAML-15765520) with js-yaml@4 in the babel-plugin-macros dependency chain.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds js-yaml resolution alongside the cosmiconfig upgrade; cosmiconfig@8
pulls in js-yaml@4.1.0 which has SNYK-JS-JSYAML-13961110 (CVE-2025-64718).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sh0ji sh0ji requested a review from a team as a code owner May 29, 2026 19:41
v9 is the current stable release; ^8.0.0 was unnecessarily conservative.
Both eliminate yaml@1.10.2 and the API used by babel-plugin-macros is unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

@sh0ji
Copy link
Copy Markdown
Member Author

sh0ji commented May 29, 2026

no good, Claude!

@sh0ji sh0ji closed this May 29, 2026
@sh0ji sh0ji deleted the fix/security-yaml-uncontrolled-recursion-20260529 branch May 29, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant