Arbitrary Code Execution Affecting yamale package, versions [, 3.0.8)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
2.49% (83rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Execution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-YAMALE-1537938
  • published10 Aug 2021
  • disclosed10 Aug 2021
  • creditUnknown

Introduced: 10 Aug 2021

CVE-2021-38305  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade yamale to version 3.0.8 or higher.

Overview

yamale is an A schema and validator for YAML.

Affected versions of this package are vulnerable to Arbitrary Code Execution. 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.

CVSS Base Scores

version 3.1