Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. yamale
  4. ›
  5. CVE-2021-38305

CVE-2021-38305: Command injection in Yamale

August 11, 2021 (updated November 19, 2024)

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.

References

  • github.com/23andMe/Yamale
  • github.com/23andMe/Yamale/pull/165
  • github.com/23andMe/Yamale/releases/tag/3.0.8
  • github.com/advisories/GHSA-435p-f82x-mxwm
  • github.com/pypa/advisory-database/tree/main/vulns/yamale/PYSEC-2021-119.yaml
  • nvd.nist.gov/vuln/detail/CVE-2021-38305

Code Behaviors & Features

Detect and mitigate CVE-2021-38305 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.0.8

Fixed versions

  • 3.0.8

Solution

Upgrade to version 3.0.8 or above.

Impact 7.8 HIGH

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-434: Unrestricted Upload of File with Dangerous Type
  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Source file

pypi/yamale/CVE-2021-38305.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:58 +0000.