Skip to content

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

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-yaml-vulnerability
Open

chore(deps): update dependency yaml to v2.8.3 [security]#898
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-yaml-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Feb 25, 2024

This PR contains the following updates:

Package Change Age Confidence
yaml (source) 2.2.12.8.3 age confidence

GitHub Vulnerability Alerts

CVE-2023-2251

Uncaught Exception in GitHub repository eemeli/yaml starting at version 2.0.0-5 and prior to 2.2.2.

CVE-2026-33532

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

Release Notes

eemeli/yaml (yaml)

v2.8.3

Compare Source

v2.8.2

Compare Source

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)

v2.7.1

Compare Source

  • Do not allow seq with single-line collection value on same line with map key (#​603)
  • Improve warning & avoid TypeError on bad YAML 1.1 nodes (#​610)

v2.7.0

Compare Source

The library is now available on JSR as @​eemeli/yaml and on deno.land/x as yaml. In addition to Node.js and browsers, it should work in Deno, Bun, and Cloudflare Workers.

  • Use .ts extension in all relative imports (#​591)
  • Ignore newline after block seq indicator as space before value (#​590)
  • Require Node.js 14.18 or later (was 14.6) (#​598)

v2.6.1

Compare Source

  • Do not strip :00 seconds from !!timestamp values (#​578, with thanks to @​qraynaud)
  • Tighten regexp for JSON !!bool (#​587, with thanks to @​vra5107)
  • Default to literal block scalar if folded would overflow (#​585)

v2.6.0

Compare Source

  • Use a proper tag for !!merge << keys (#​580)
  • Add stringKeys parse option (#​581)
  • Stringify a Document as a Document (#​576)
  • Add sponsorship by Manifest

v2.5.1

Compare Source

  • Include range in flow sequence pair maps (#​573)

v2.5.0

Compare Source

  • Add --indent option to CLI tool (#​559, with thanks to @​danielbayley)
  • Require newline in all cases for props on block sequence (#​557)
  • Always reset indentation in lexer on ... (#​558)
  • Ignore minContentWidth if greater than lineWidth (#​562)
  • Drop unused Collection.maxFlowStringSingleLineLength (#​522, #​421)

v2.4.5

Compare Source

v2.4.4

Compare Source

With special thanks to @​RedCMD for finding and reporting all of the following:

  • Allow comment after top-level block scalar with explicit indent indicator (#​547)
  • Allow tab as indent for line comments before nodes (#​548)
  • Do not allow tab before block collection (#​549)
  • In flow collections, allow []{} immediately after : with plain key (#​550)
  • Require indentation for ? explicit-key contents (#​551)
  • Require indentation from block scalar header & flow collections in mapping values (#​553)

v2.4.3

Compare Source

  • Improve error when parsing a non-string value (#​459)
  • Do not parse -.NaN or +.nan as NaN (#​546)
  • Support # within %TAG prefixes with trailing #comments
  • Check for non-node complex keys when stringifying with simpleKeys (#​541)

v2.4.2

Compare Source

  • Restrict YAML 1.1 boolean strings to their explicit capitalization (#​530)
  • Add sponsorship by Scipress (#​536)

v2.4.1

Compare Source

  • cst: Do not drop trailing newline after line comment in block-map if followed by unindented block-seq value (#​525)
  • Stringify flow collection comments in parent (#​528)
  • Do not skip folding lines after the first in indented block scalars (#​529)

v2.4.0

Compare Source

  • Add a command-line tool (#​523)
  • Use the lineWidth option for line breaking in flow collections (#​522)

v2.3.4

Compare Source

  • Do not throw for carriage return in tag shorthand (#​501)

v2.3.3

Compare Source

  • Do not throw error on malformed URI escape in tag (#​498)

v2.3.2

Compare Source

  • Fix docs typo (#​489)
  • Do not require quotes for implicit keys with flow indicators (#​494)
  • Update Prettier to v3 & update ESLint config

v2.3.1

Compare Source

  • Drop npm from package.json "engines" config (#​476)

v2.3.0

Compare Source

This release corresponds with the release of yaml-types v0.2.0, an expanding library of custom tags or types for use with yaml.

This release contains no changes from v2.3.0-5, and the notes below include all changes from the v2.3.0-x prereleases.

Custom Tag Improvements
  • Add export of createNode() & createPair() to 'yaml/util' (#​457)
  • Add static from() methods to simplify tag development, and otherwise make extending custom collections easier (#​467)
TypeScript Improvements
  • Add a second optional generic type argument Strict to Document instances. (#​441)
  • Add types exports for TypeScript (#​463)
  • Export StringifyContext type from 'yaml/util' (#​464)
Other New Features
  • Add a toJS(doc, options?) method to nodes (#​451, #​458)
  • Set explicit tag during createNode() for non-default tags (#​464)
Bugfixes
  • Use correct argument order when stringifying flow collection comments (#​443)
  • Improve first-line folding for block scalars (#​422)

v2.2.2

Compare Source

This patch release includes a fix for an error that could be thrown in parseDocument for degenerate input. Otherwise, it's a patch release uplifting a few fixes from the ongoing v2.3 work to v2.2:

  • Corner case failure in error pretty-printer (CVE-2023-2251)
  • Use correct argument order when stringifying flow collection comments (#​443)
  • First-line folding for block scalars (#​422)

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, 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.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
it-tools ✅ Ready (Inspect) Visit Preview Jul 2, 2025 6:56pm

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Aug 9, 2024

@renovate renovate bot changed the title fix(deps): update dependency yaml to v2.2.2 [security] fix(deps): update dependency yaml to v2.2.2 [security] - autoclosed Dec 8, 2024
@renovate renovate bot closed this Dec 8, 2024
@renovate renovate bot deleted the renovate/npm-yaml-vulnerability branch December 8, 2024 18:31
@renovate renovate bot changed the title fix(deps): update dependency yaml to v2.2.2 [security] - autoclosed fix(deps): update dependency yaml to v2.2.2 [security] Dec 8, 2024
@renovate renovate bot reopened this Dec 8, 2024
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch 2 times, most recently from ae6e475 to 0feb04c Compare December 14, 2024 11:16
@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jul 2, 2025

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Aug 10, 2025

Deploying it-tools-legacy with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3ee7f1a
Status:🚫  Build failed.

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Aug 10, 2025

Deploying it-tools with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3ee7f1a
Status:🚫  Build failed.

View logs

@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch 2 times, most recently from c3ba028 to 6200256 Compare August 19, 2025 13:38
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from 6200256 to 9b0f300 Compare August 31, 2025 14:02
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from 9b0f300 to 226dd4b Compare September 25, 2025 20:30
@renovate renovate bot changed the title fix(deps): update dependency yaml to v2.2.2 [security] chore(deps): update dependency yaml to v2.2.2 [security] Sep 25, 2025
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from 226dd4b to 5fb8ad8 Compare October 22, 2025 01:11
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from 5fb8ad8 to 227fdab Compare November 11, 2025 01:15
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from 227fdab to 8f7b03c Compare November 18, 2025 14:00
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from 8f7b03c to a924c0f Compare December 3, 2025 19:53
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from a924c0f to b79b0bd Compare December 31, 2025 16:48
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from b79b0bd to 73d9926 Compare January 8, 2026 17:06
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch 2 times, most recently from 22c631c to a65b161 Compare January 23, 2026 17:35
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from a65b161 to ac6c3b3 Compare February 2, 2026 18:56
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch 2 times, most recently from 7814001 to 80d0c56 Compare February 17, 2026 21:55
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from 80d0c56 to 8114084 Compare March 5, 2026 14:01
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from 8114084 to 86413f6 Compare March 13, 2026 16:15
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from 86413f6 to 8f387db Compare March 26, 2026 14:36
@renovate renovate bot changed the title chore(deps): update dependency yaml to v2.2.2 [security] chore(deps): update dependency yaml to v2.8.3 [security] Mar 26, 2026
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from 8f387db to 3ee7f1a Compare April 1, 2026 19:59
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

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.

0 participants