Home / Companies / Semgrep / Blog / Post Details
Content Deep Dive

Fully loaded: testing vulnerable PyYAML versions

Blog post from Semgrep

Post Details
Company
Date Published
Author
Grayson Hardaway
Word Count
947
Company Posts That Month
3
Language
English
Hacker News Points
-
Post removed?
No
Summary

PyYAML's API has undergone significant scrutiny and updates to address deserialization vulnerabilities that could allow arbitrary code execution, particularly involving the yaml.load function. Historically, the function was deemed unsafe, leading to the introduction of FullLoader and UnsafeLoader classes to mitigate risks. Despite these efforts, vulnerabilities such as CVE-2020-1747 and CVE-2020-14343 were discovered, prompting further patches in version 5.4. Testing using Tox confirmed that while yaml.safe_load has consistently been secure across all versions, yaml.load and yaml.full_load became safe from known exploits post-version 5.4. As a result, Semgrep's Python YAML deserialization rule was updated to specifically alert on vulnerable APIs from version 5.4 onwards, encouraging users to either upgrade their PyYAML versions or ensure the use of safe_load for security.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.