PyPi: Yamale

CVE-2021-38305

Safety vulnerability ID: 41094

This vulnerability was reviewed by experts

The information on this page was manually curated by our Cybersecurity Intelligence Team.

Created at Aug 09, 2021 Updated at Jan 02, 2025
Scan your Python projects for vulnerabilities →

Advisory

Yamale 3.0.8 includes a fix for CVE-2021-38305: 23andMe Yamale before 3.0.8 allows remote attackers to execute arbitrary code via a crafted schema file. The schema parser uses eval as part of its processing, and tries to protect from malicious expressions by limiting the builtins that are passed to the eval. When processing the schema, each line is run through Python's eval function to make the validator available. A well-constructed string within the schema rules can execute system commands; thus, by exploiting the vulnerability, an attacker can run arbitrary code on the image that invokes Yamale.
https://github.com/23andMe/Yamale/pull/165
https://github.com/23andMe/Yamale/releases/tag/3.0.8

Affected package

yamale

Latest version: 6.0.0

A schema and validator for YAML.

Affected versions

Fixed versions

Vulnerability changelog

23andMe Yamale before 3.0.8 allows remote attackers to execute arbitrary code via a crafted schema file. The schema parser uses eval as part of its processing, and tries to protect from malicious expressions by limiting the builtins that are passed to the eval. When processing the schema, each line is run through Python's eval function to make the validator available. A well-constructed string within the schema rules can execute system commands; thus, by exploiting the vulnerability, an attacker can run arbitrary code on the image that invokes Yamale. See CVE-2021-38305.


MISC:https://github.com/23andMe/Yamale/pull/165: https://github.com/23andMe/Yamale/pull/165
MISC:https://github.com/23andMe/Yamale/releases/tag/3.0.8: https://github.com/23andMe/Yamale/releases/tag/3.0.8

Resources

Use this package?

Scan your Python project for dependency vulnerabilities in two minutes

Scan your application

Severity Details

CVSS Base Score

HIGH 7.8

CVSS v3 Details

HIGH 7.8
Attack Vector (AV)
LOCAL
Attack Complexity (AC)
LOW
Privileges Required (PR)
NONE
User Interaction (UI)
REQUIRED
Scope (S)
UNCHANGED
Confidentiality Impact (C)
HIGH
Integrity Impact (I)
HIGH
Availability Availability (A)
HIGH

CVSS v2 Details

HIGH 9.3
Access Vector (AV)
NETWORK
Access Complexity (AC)
MEDIUM
Authentication (Au)
NONE
Confidentiality Impact (C)
COMPLETE
Integrity Impact (I)
COMPLETE
Availability Impact (A)
COMPLETE