Vulnerability library
Security checkMarch 27, 2026

yaml is vulnerable to Stack Overflow via deeply nested YAML collections

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmyaml

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

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

Recommendation

Update the yaml package to the latest compatible version. Followings are version details:

  • Affected version(s): **>= 1.0.0, < 1.10.3 >= 2.0.0, < 2.8.3**
  • Patched version(s): **1.10.3 2.8.3**

References

Could your website be exposed too?

SmartScanner can check your website for yaml is vulnerable to Stack Overflow via deeply nested YAML collections and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated March 27, 2026