Advisory

GHSA-rprw-h62v-c2w7

Also known as: CVE-2017-18342, PYSEC-2018-49

Summary

PyYAML insecurely deserializes YAML strings leading to arbitrary code execution

Details

In PyYAML before 5.1, the yaml.load() API could execute arbitrary code. In other words, yaml.safe_load is not used.

This was intended to be fixed in 4.1, but due to breaking changes, 4.1 was yanked and 5.1 contains the patch for CVE-2017-18342.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2019-01-04 17:45 UTC
Modified
2026-07-01 17:45 UTC

Affected packages and fixes

pyyaml

PyPI · All systems

Affected

  • introduced 0, fixed 5.1 (ecosystem)

Fixed versions

5.1

Fix

  • Fixed version 5.1
    pip install --upgrade pyyaml==5.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences