VAITP Dataset

← Back to the dataset

CVE-2024-35060

YAML library vulnerability in NASA AIT-Core v2.5.2 allows command execution.

  • CVSS 7.5
  • CWE-319
  • Input Validation and Sanitization
  • Local

An issue in the YAML Python library of NASA AIT-Core v2.5.2 allows attackers to execute arbitrary commands via supplying a crafted YAML file.

CVSS base score
7.5
Published
2024-05-21
OWASP
A01 Broken Access Control
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Local
Impact
Arbitrary Code Execution
Affected component
YAML Python
Fixed by upgrading
Yes

Solution

Upgrade to NASA AIT-Core v2.5.3 or later.

Vulnerable code sample

import yaml

def load_yaml(file_path):
    with open(file_path, 'r') as file:
        data = yaml.load(file, Loader=yaml.FullLoader)
    return data

data = load_yaml('example.yaml')
print(data)

Patched code sample

import yaml

def load_yaml(file_path):
    with open(file_path, 'r') as file:
        data = yaml.safe_load(file)
    return data

data = load_yaml('example.yaml')
print(data)

Payload

!!python/object/apply:os.system ["echo vulnerable"]

Cite this entry

@misc{vaitp:cve202435060,
  title        = {{YAML library vulnerability in NASA AIT-Core v2.5.2 allows command execution.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2024},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2024-35060},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-35060/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::