Improper Input Validation in PyYAML
Published 20 Apr 2021 · Updated 4 May 2026
Is your project on an affected pyyaml?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- >=5.1b7 <5.3.1
- Fixed in
- 5.3.1
pip install 'pyyaml>=5.3.1'Details
A vulnerability was discovered in the PyYAML library in versions before 5.3.1, where it is susceptible to arbitrary code execution when it processes untrusted YAML files through the full_load method or with the FullLoader loader. Applications that use the library to process untrusted input may be vulnerable to this flaw. An attacker could use this flaw to execute arbitrary code on the system by abusing the python/object/new constructor.
Is GHSA-6757-jp84-gxfx in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected pyyaml, and gives you the command that fixes it.
More advisories for pyyaml
- CriticalCVE-2019-20477Deserialization of Untrusted Data in PyYAML · 20 Apr 2021
- CriticalCVE-2020-14343Improper Input Validation in PyYAML · 25 Mar 2021
- CriticalCVE-2017-18342PyYAML insecurely deserializes YAML strings leading to arbitrary code execution · 4 Jan 2019
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2020-1747
- Linkgithub.com/github/advisory-database/pull/4942
- Linkgithub.com/yaml/pyyaml/pull/386
- Linkgithub.com/yaml/pyyaml/commit/0cedb2a0697b2bc49e4f3841b8d4590b6b15657e
- Linkgithub.com/yaml/pyyaml/commit/5080ba513377b6355a0502104846ee804656f1e0
- Linkbugzilla.redhat.com/show_bug.cgi?id=CVE-2020-1747
- Advisorygithub.com/advisories/GHSA-6757-jp84-gxfx
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/pyyaml/PYSEC-2020-96.yaml
- Packagegithub.com/yaml/pyyaml
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7PPAS6C4SZRDQLR7C22A5U3QOLXY33JX
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/K5HEPD7LEVDPCITY5IMDYWXUMX37VFMY
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MMQXSZXNJT6ERABJZAAICI3DQSQLCP3D
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WORRFHPQVAFKKXXWLSSW6XKUYLWM6CSH
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZBJA3SGNJKCAYPSHOHWY3KBCWNM5NYK2
- Linkwww.oracle.com/security-alerts/cpujul2022.html
- Linklists.opensuse.org/opensuse-security-announce/2020-04/msg00017.html
- Linklists.opensuse.org/opensuse-security-announce/2020-05/msg00017.html
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.