js-yaml Vulnerability

MEDIUM (5.3) Patch Available Patch

Threat Intelligence

Medium Risk - Detectable
EPSS Score: 0.02% chance of exploitation (percentile: 4%)
🔍 Detection Tools: OSV.dev
⚔️ Exploit Availability: No public exploits found

How we test →

What is it?

js-yaml is a JavaScript YAML parser and dumper. It's used to parse and generate YAML data in various applications. The vulnerability allows an attacker to modify the prototype of the result of a parsed yaml document via prototype pollution (__proto__). This can lead to unexpected behavior, data corruption, or even arbitrary code execution.

Am I affected?

You're affected if you use js-yaml versions below 4.1.0. Check with: npm ls js-yaml (in the terminal) to see your current version.

Note: If you don't recognise js-yaml as a JavaScript YAML parser, you're probably not affected by this vulnerability.

Affected Packages

npm: js-yaml

How to fix

Upgrade to js-yaml 4.1.1 or later.
npm: npm install js-yaml@4.1.1
- Alternatively, use node --disable-proto=delete or deno (in Deno, pollution protection is on by default) as a workaround.