The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2020-1747

CVE-2020-1747: PyYAML Library RCE Vulnerability

CVE-2020-1747 is a remote code execution vulnerability in PyYAML library versions before 5.3.1 that allows attackers to execute arbitrary code when processing untrusted YAML files. This article covers technical details, impact, and fixes.

Published: March 4, 2026

CVE-2020-1747 Overview

A critical insecure deserialization vulnerability was discovered in the PyYAML library in versions before 5.3.1. The library 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.

Critical Impact

Remote attackers can achieve arbitrary code execution on vulnerable systems by crafting malicious YAML documents that abuse Python object instantiation through the python/object/new constructor when processed by the FullLoader.

Affected Products

  • PyYAML versions prior to 5.3.1
  • Fedora 30, 31, 32, and 33
  • openSUSE Leap 15.1
  • Oracle Communications Cloud Native Core Network Function Cloud Native Environment 22.1.0

Discovery Timeline

  • 2020-03-24 - CVE-2020-1747 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-1747

Vulnerability Analysis

This vulnerability represents a classic insecure deserialization flaw in PyYAML's handling of YAML documents. The FullLoader class, which was introduced as a safer alternative to the yaml.load() function with Loader=Loader, still permits the instantiation of arbitrary Python objects through the python/object/new constructor tag.

When PyYAML parses a YAML document containing specially crafted tags, it can be tricked into instantiating Python objects and calling their constructors with attacker-controlled arguments. This allows remote attackers to execute arbitrary Python code in the context of the application processing the malicious YAML file.

The vulnerability is particularly dangerous because many applications use PyYAML to parse configuration files, API responses, or user-submitted data without realizing the security implications of using full_load() or FullLoader.

Root Cause

The root cause lies in the improper input validation (CWE-20) within PyYAML's FullLoader class. While the FullLoader was designed to be safer than the unrestricted Loader, it still allows the python/object/new constructor which can be abused to instantiate arbitrary Python objects. The library failed to adequately restrict which Python types could be instantiated during deserialization, allowing attackers to leverage this constructor to call system functions and execute commands.

Attack Vector

The attack vector is network-based, requiring no user interaction or special privileges. An attacker exploits this vulnerability by:

  1. Crafting a malicious YAML document that contains the !!python/object/new constructor tag
  2. Embedding a reference to a Python class that can execute system commands (such as subprocess.Popen)
  3. Providing command arguments that will be executed when the object is instantiated
  4. Delivering this payload to an application that processes YAML using yaml.full_load() or yaml.load(data, Loader=FullLoader)

When the vulnerable application deserializes the malicious YAML document, PyYAML instantiates the specified Python object, effectively executing the attacker's code on the target system.

The exploitation mechanism involves embedding malicious Python object references in YAML documents. When parsed with the vulnerable loader, these references trigger instantiation of dangerous classes like subprocess.Popen, enabling command execution. Technical details and the security fix are available in the GitHub PyYAML Pull Request.

Detection Methods for CVE-2020-1747

Indicators of Compromise

  • YAML files containing !!python/object/new or !!python/object/apply constructor tags in application input directories
  • Unexpected process spawning from Python applications that parse YAML content
  • Anomalous network connections originating from services that handle YAML input
  • Log entries indicating YAML parsing errors followed by system command execution

Detection Strategies

  • Implement static code analysis to identify usage of yaml.full_load() or FullLoader in application codebases
  • Deploy runtime application monitoring to detect unexpected subprocess creation during YAML parsing operations
  • Utilize dependency scanning tools to identify PyYAML versions prior to 5.3.1 in project dependencies
  • Monitor for YAML documents containing suspicious Python object constructor patterns in application inputs

Monitoring Recommendations

  • Enable verbose logging for applications processing YAML input to capture parsing events and potential exploitation attempts
  • Configure file integrity monitoring for configuration files parsed by vulnerable PyYAML instances
  • Implement network traffic analysis to detect exfiltration attempts following successful exploitation
  • Set up alerts for unusual Python process behavior patterns associated with YAML processing services

How to Mitigate CVE-2020-1747

Immediate Actions Required

  • Upgrade PyYAML to version 5.3.1 or later immediately across all environments
  • Replace usage of yaml.full_load() with yaml.safe_load() for parsing untrusted input
  • Audit all applications that process external YAML content and identify vulnerable code paths
  • Implement input validation to reject YAML documents containing Python object constructor tags

Patch Information

PyYAML version 5.3.1 contains the security fix for this vulnerability. The patch restricts the FullLoader from instantiating arbitrary Python objects through the python/object/new constructor. Organizations should update their PyYAML dependency to the patched version using their package manager:

For pip: pip install --upgrade pyyaml>=5.3.1

For additional details, refer to the GitHub PyYAML Pull Request, Red Hat CVE-2020-1747 Details, and the Oracle July 2022 Security Alert.

Workarounds

  • Use yaml.safe_load() instead of yaml.full_load() when parsing untrusted YAML content as an immediate mitigation
  • Implement input sanitization to strip or reject YAML documents containing !!python/ tags before processing
  • Deploy application-level sandboxing to limit the impact of potential code execution
  • Consider using alternative YAML parsing libraries that do not support arbitrary object instantiation
bash
# Upgrade PyYAML to patched version
pip install --upgrade 'pyyaml>=5.3.1'

# Verify installed version
pip show pyyaml | grep Version

# Search for vulnerable code patterns in your codebase
grep -r "full_load\|FullLoader" --include="*.py" /path/to/project

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechPyyaml

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability3.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-20
  • Technical References
  • openSUSE Security Announcement April 2020

  • openSUSE Security Announcement May 2020

  • Fedora Package Announcement 1

  • Fedora Package Announcement 2

  • Fedora Package Announcement 3

  • Fedora Package Announcement 4

  • Fedora Package Announcement 5
  • Vendor Resources
  • Red Hat CVE-2020-1747 Details

  • GitHub PyYAML Pull Request

  • Oracle July 2022 Security Alert
  • Related CVEs
  • CVE-2020-14343: PyYAML Library RCE Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English