Skip to content

pyyaml (PyPI)

Canonical source repository for PyYAML

Advisories
10
Latest version
6.0.3
Released Sep 25, 2025
License
MIT
OpenSSF Scorecard
4.8 / 10

How to fix

Upgrading to 5.4 or later clears every advisory below that has a fix.

Upgrade commands
pip
pip install --upgrade "pyyaml>=6.0.3"
poetry
poetry add "pyyaml>=6.0.3"
uv
uv add "pyyaml>=6.0.3"

Known vulnerabilities

AdvisorySeverityAffectedFixed in
GHSA-8q59-q68h-6hv4
Improper Input Validation in PyYAML
Critical
EPSS 5.98%
< 5.4
5.4
GHSA-8q59-q68h-6hv4
Improper Input Validation in PyYAML
Critical
EPSS 5.98%
< 5.4
5.4
GHSA-6757-jp84-gxfx
Improper Input Validation in PyYAML
Critical
EPSS 5.44%
>= 5.1, < 5.3.1
5.3.1
GHSA-6757-jp84-gxfx
Improper Input Validation in PyYAML
Critical
EPSS 5.44%
>= 5.1b7, < 5.3.1
5.3.1
GHSA-3pqx-4fqf-j49f
Deserialization of Untrusted Data in PyYAML
Critical
EPSS 5.11%
>= 5.1, < 5.2
5.2
PYSEC-2020-195
PyYAML 5.1 through 5.1.2 has insufficient restrictions on the load and load_all functions because of a class deserialization issue, e.g., Popen is a class in…
Withdrawn
Not rated yet
>= 5.1, < 5.2b1
5.2b1
GHSA-3pqx-4fqf-j49f
Deserialization of Untrusted Data in PyYAML
Critical
EPSS 5.11%
>= 5.1, < 5.2b1
5.2b1
GHSA-rprw-h62v-c2w7
PyYAML insecurely deserializes YAML strings leading to arbitrary code execution
Critical
EPSS 5.66%
< 5.1
5.1
GHSA-rprw-h62v-c2w7
PyYAML insecurely deserializes YAML strings leading to arbitrary code execution
Critical
EPSS 5.66%
< 5.1
5.1
GHSA-rprw-h62v-c2w7
PyYAML insecurely deserializes YAML strings leading to arbitrary code execution
Critical
EPSS 5.66%
< 5.1
5.1

Source: https://github.com/yaml/pyyaml

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor