# CVE-2013-4660: js-yaml deserialization code execution

Source: https://junglewise.ai/threats/cve-2013-4660-js-yaml-deserialization-code-execution  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2017-10-24. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2013-4660 · Severity: info · Published 2017-10-24

js-yaml is a popular JavaScript library for parsing YAML configuration files. Versions 2.0.4 and earlier allow arbitrary code execution when processing untrusted YAML input through the .load() method, enabling attackers to execute malicious code directly on systems that parse such data.

Technologies: [js-yaml (npm)](https://junglewise.ai/threats/technologies/js-yaml). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2013-4660 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2013-4660 being exploited in the wild.

**How severe is CVE-2013-4660?** Informational severity, published 24 October 2017.

**Which products and versions are affected?** js-yaml (npm) SEMVER:introduced=0,fixed=2.0.5.

**Is there a fix for CVE-2013-4660?** Yes. js-yaml (npm): upgrade to 2.0.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2013-4660 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2013-4660?** Check whether you run js-yaml (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- js-yaml (npm): upgrade to 2.0.5 or later

  ```sh
  npm install js-yaml@2.0.5
  ```


## Technical details

The vulnerability is a deserialization code execution flaw in the YAML deserializer (CWE-20: Improper Input Validation). The root cause is unsafe handling of JavaScript-specific YAML tags (!!js/function) that allow embedding and executing arbitrary JavaScript functions during deserialization. An attacker can craft malicious YAML input containing function definitions that are executed when parsed via the .load() method. No authentication or special preconditions are required—any application that parses untrusted YAML using the vulnerable .load() method is susceptible. The fix is to upgrade to js-yaml 2.0.5 or later and replace all .load() calls with .safeLoad().

## Affected products

- js-yaml js-yaml 2.0.4 and earlier

## Identifiers

- CVE-2013-4660
- GHSA-xxvw-45rp-3mj2

## Timeline

- 2013: disclosed: Original vulnerability disclosed
- 2017-10-24: advisory: GitHub Security Advisory published
- 2013: patched: Fix available in js-yaml 2.0.5

## Related threats

- [js-yaml CPU exhaustion via merge keys with empty mappings](https://junglewise.ai/threats/js-yaml-maxtotalmergekeys-does-not-limit-cpu-use-for-empty-merge-e18172a3)
- [js-yaml YAML merge CPU consumption DoS](https://junglewise.ai/threats/cve-2026-84375-js-yaml-denial-of-service-via-empty-merge-sources)
- [js-yaml exponential parsing time in flow collections denial of service](https://junglewise.ai/threats/cve-2026-73643-js-yaml-exponential-parsing-time-in-flow-collections-denial-of)
- [JS-YAML quadratic CPU consumption in !!omap resolution](https://junglewise.ai/threats/js-yaml-quadratic-cpu-consumption-in-omap-resolution-f21ac1bd)
- [nodeca js-yaml denial of service in YAML11_SCHEMA omap parsing](https://junglewise.ai/threats/cve-2026-59870-nodeca-js-yaml-denial-of-service-in-yaml11-schema-omap-parsing)
