Skip to content

chore(deps): update dependency yaml to v2.8.3 [security] - #234

Merged
renovate[bot] merged 1 commit into
mainfrom
renovate/npm-yaml-vulnerability
Jul 29, 2026
Merged

chore(deps): update dependency yaml to v2.8.3 [security]#234
renovate[bot] merged 1 commit into
mainfrom
renovate/npm-yaml-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
yaml (source) 2.7.12.8.3 age confidence

yaml is vulnerable to Stack Overflow via deeply nested YAML collections

CVE-2026-33532 / GHSA-48c2-rrv3-qjmp

More information

Details

Parsing a YAML document with yaml may throw a RangeError due to a stack overflow.

The node resolution/composition phase uses recursive function calls without a depth bound. An attacker who can supply YAML for parsing can trigger a RangeError: Maximum call stack size exceeded with a small payload (~2–10 KB). The RangeError is not a YAMLParseError, so applications that only catch YAML-specific errors will encounter an unexpected exception type. Depending on the host application's exception handling, this can fail requests or terminate the Node.js process.

Flow sequences allow deep nesting with minimal bytes (2 bytes per level: one [ and one ]). On the default Node.js stack, approximately 1,000–5,000 levels of nesting (2–10 KB input) exhaust the call stack. The exact threshold is environment-dependent (Node.js version, stack size, call stack depth at invocation).

Note: the library's Parser (CST phase) uses a stack-based iterative approach and is not affected. Only the compose/resolve phase uses actual call-stack recursion.

All three public parsing APIs are affected: YAML.parse(), YAML.parseDocument(), and YAML.parseAllDocuments().

PoC
const YAML = require('yaml');

// ~10 KB payload: 5000 levels of nested flow sequences
const payload = '['.repeat(5000) + '1' + ']'.repeat(5000);

try {
  YAML.parse(payload);
} catch (e) {
  console.log(e.constructor.name); // RangeError (NOT YAMLParseError)
  console.log(e.message);          // Maximum call stack size exceeded
}

Test environment: Node.js v24.12.0, macOS darwin arm64

Version Nesting Depth Input Size Result
1.0.0 5,000 10,001 B RangeError
1.10.2 5,000 10,001 B RangeError
2.0.0 5,000 10,001 B RangeError
2.8.2 5,000 10,001 B RangeError
2.8.3 5,000 10,001 B YAMLParseError

Depth threshold on yaml 2.8.2:

Nesting Depth Input Size Result
500 1,001 B Parses successfully
1,000 2,001 B RangeError (threshold varies by stack size)
5,000 10,001 B RangeError

Severity

  • CVSS Score: 4.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

eemeli/yaml (yaml)

v2.8.3

Compare Source

  • Add trailingComma ToString option for multiline flow formatting (#​670)
  • Catch stack overflow during node composition (1e84ebb)

v2.8.2

Compare Source

  • Serialize -0 as -0 (#​638)
  • Do not double newlines for empty map values (#​642)

v2.8.1

Compare Source

  • Preserve empty block literals (#​634)

v2.8.0

Compare Source

  • Add node cache for faster alias resolution (#​612)
  • Re-introduce compatibility with Node.js 14.6 (#​614)
  • Add --merge option to CLI tool (#​611)
  • Improve error for tag resolution error on null value (#​616)
  • Allow empty string as plain scalar representation, for failsafe schema (#​616)
  • docs: include cli example (#​617)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot enabled auto-merge (squash) March 26, 2026 22:08
@changeset-bot

changeset-bot Bot commented Mar 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 83ff8e4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codesandbox-ci

codesandbox-ci Bot commented Mar 26, 2026

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@pkg-pr-new

pkg-pr-new Bot commented Mar 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/changesets-gitlab@234

commit: 83ff8e4

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

📊 Package size report   No changes

File Before After
Total (Includes all files) 134.0 kB 134.0 kB
Tarball size 33.6 kB 0.02%↑33.6 kB
Unchanged files
File Size
index.d.cts 73 B
lib/api.d.ts 99 B
lib/api.js 899 B
lib/api.js.map 1.0 kB
lib/cli.d.ts 39 B
lib/cli.js 734 B
lib/cli.js.map 932 B
lib/comment.d.ts 247 B
lib/comment.js 10.0 kB
lib/comment.js.map 7.5 kB
lib/context.d.ts 74 B
lib/context.js 138 B
lib/context.js.map 228 B
lib/env.d.ts 70 B
lib/env.js 857 B
lib/env.js.map 778 B
lib/get-changed-packages.d.ts 305 B
lib/get-changed-packages.js 4.8 kB
lib/get-changed-packages.js.map 4.7 kB
lib/git-utils.d.ts 646 B
lib/git-utils.js 1.7 kB
lib/git-utils.js.map 2.2 kB
lib/index.cjs 40.3 kB
lib/index.d.ts 274 B
lib/index.js 241 B
lib/index.js.map 249 B
lib/main.d.ts 153 B
lib/main.js 3.6 kB
lib/main.js.map 3.1 kB
lib/read-changeset-state.d.ts 252 B
lib/read-changeset-state.js 650 B
lib/read-changeset-state.js.map 767 B
lib/run.d.ts 1.1 kB
lib/run.js 8.8 kB
lib/run.js.map 8.1 kB
lib/types.d.ts 1.2 kB
lib/types.js 44 B
lib/types.js.map 102 B
lib/utils.d.ts 1.6 kB
lib/utils.js 4.2 kB
lib/utils.js.map 4.8 kB
LICENSE 1.1 kB
package.json 3.4 kB
README.md 11.8 kB

🤖 This report was automatically generated by pkg-size-action

@renovate renovate Bot changed the title chore(deps): update dependency yaml to v2.8.3 [security] chore(deps): update dependency yaml to v2.8.3 [security] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
auto-merge was automatically disabled April 27, 2026 19:31

Pull request was closed

@renovate
renovate Bot deleted the renovate/npm-yaml-vulnerability branch April 27, 2026 19:31
@renovate renovate Bot changed the title chore(deps): update dependency yaml to v2.8.3 [security] - autoclosed chore(deps): update dependency yaml to v2.8.3 [security] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate
renovate Bot force-pushed the renovate/npm-yaml-vulnerability branch from 3132864 to a9c3549 Compare April 27, 2026 23:15
@sonarqubecloud

Copy link
Copy Markdown

@socket-security

socket-security Bot commented Apr 27, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@renovate
renovate Bot force-pushed the renovate/npm-yaml-vulnerability branch from a9c3549 to e8e499a Compare May 12, 2026 10:57
@renovate
renovate Bot enabled auto-merge (squash) May 12, 2026 10:57
@sonarqubecloud

Copy link
Copy Markdown

@socket-security

socket-security Bot commented May 12, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedyaml@​2.7.1 ⏵ 2.9.0100 +1100 +210084 -1100

View full report

@renovate
renovate Bot force-pushed the renovate/npm-yaml-vulnerability branch from e8e499a to 363652c Compare July 29, 2026 18:46
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@renovate
renovate Bot force-pushed the renovate/npm-yaml-vulnerability branch from 363652c to 880d7de Compare July 29, 2026 18:55
@renovate
renovate Bot force-pushed the renovate/npm-yaml-vulnerability branch from 880d7de to 83ff8e4 Compare July 29, 2026 19:01
@sonarqubecloud

Copy link
Copy Markdown

@JounQin

JounQin commented Jul 29, 2026

Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: eb049339-5256-44c2-a9d9-918e63e98da9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@renovate
renovate Bot merged commit 0d8917b into main Jul 29, 2026
19 of 20 checks passed
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