Skip to main content
← All vulnerabilities
CVE-2024-23346PYSEC-2024-226GHSA-VGV8-5CPJ-QJ2F

pymatgen arbitrary code execution when parsing a maliciously crafted JonesFaithfulTransformation transformation_string

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2024.2.20
1 on Exploit-DB, 5 proofs of concept on GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: total

Summary

Pymatgen (Python Materials Genomics) is an open-source Python library for materials analysis. A critical security vulnerability exists in the `JonesFaithfulTransformation.from_transformation_str()` method within the `pymatgen` library prior to version 2024.2.20. This method insecurely utilizes `eval()` for processing input, enabling execution of arbitrary code when parsing untrusted input. Version 2024.2.20 fixes this issue.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: total

  3. Record last updated
  4. Public exploit on Exploit-DB

    EDB-52205

Affected versions

  • materialsproject pymatgen

    fixed in 2024.2.20

  • pymatgenPyPI

    fixed in 2024.2.20

  • pymatgenPyPI

    fixed in 2024.2.20

References 9

GitHub · materialsproject/pymatgen

Exploit-DB

GitHub · 9carlo6/CVE-2024-23346

GitHub · DAVIDAROCA27/CVE-2024-23346-exploit

GitHub · MAWK0235/CVE-2024-23346

GitHub · Sanity-Archive/CVE-2024-23346

GitHub · szyth/CVE-2024-23346-rust-exploit