Skip to content

chore: update dependency yaml to v2.8.3 [security]#1593

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

chore: update dependency yaml to v2.8.3 [security]#1593
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/npm-yaml-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented May 26, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
yaml (source) 2.1.12.8.3 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

GitHub Vulnerability Alerts

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)

v2.2.1

Compare Source

  • Quote top-level map keys containing document markers (#​431)

v2.2.0

Compare Source

New Features
  • Add flowCollectionPadding toString option (#​420)
  • Use indicator line for props on block collection values of mappings (#​425)
Bugfixes
  • Minor relaxation of types for custom tags (#​429)

v2.1.3

Compare Source

  • Set correct node-end position for block collections with comments (#​413)

v2.1.2

Compare Source

  • Set correct node-end position for empty values with comments (#​413)

Configuration

📅 Schedule: Branch creation - "" (UTC), 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 requested a review from mrmodise as a code owner May 26, 2023 17:03
@renovate renovate bot changed the title chore: update dependency yaml to 2.2.2 [security] chore: update dependency yaml to v2.2.2 [security] May 30, 2023
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from 592cc96 to e58db6e Compare August 10, 2025 14:37
@renovate
Copy link
Copy Markdown
Contributor Author

renovate bot commented Aug 10, 2025

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: packages/shopping/package-lock.json
npm ERR! code ETARGET
npm ERR! notarget No matching version found for loopback4-example-recommender@1.1.1.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /runner/cache/others/npm/_logs/2026-03-27T05_37_27_335Z-debug-0.log

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot force-pushed the renovate/npm-yaml-vulnerability branch from e58db6e to acddc64 Compare March 27, 2026 05:37
@renovate renovate bot changed the title chore: update dependency yaml to v2.2.2 [security] chore: update dependency yaml to v2.8.3 [security] Mar 27, 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