Read the docs
TI-2019-16128 Aliases GHSA-8j8c-7jfh-h6hx

Code Injection in js-yaml

Priority LOW 38CWE-94Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
Code execution
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-94.

Summary

Versions of `js-yaml` prior to 3.13.1 are vulnerable to Code Injection. The `load()` function may execute arbitrary code injected through a malicious YAML file. Objects that have `toString` as key, JavaScript code as value and are used as explicit mapping keys allow attackers to execute the supplied code through the `load()` function. The `safeLoad()` function is unaffected. An example payload is `{ toString: !<tag:yaml.org,2002:js/function> 'function (){return Date.now()}' } : 1` which returns the object { "1553107949161": 1 } ## Recommendation Upgrade to version 3.13.1.

Why it matters now

Fix Fixed js-yaml (npm): 3.13.1

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—js-yaml (npm)before 3.13.13.13.1Patch availableGHSA-8j8c-7jfh-h6hx
  • js-yaml (npm) Vendor— Affected before 3.13.1 Fixed in 3.13.1 Patch available GHSA-8j8c-7jfh-h6hx

Remediation

  • Fix · GHSA-8j8c-7jfh-h6hx js-yaml (npm) Fixed in 3.13.1 Advisory →

Timeline

  1. 2026-10-03 Threatist record created from GHSA-8j8c-7jfh-h6hx

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences