CVE-2024-23346

pymatgen arbitrary code execution when parsing a maliciously crafted JonesFaithfulTransformation transformation_string

Published Feb 21, 2024 CVSS 3.1 · 9.4 Critical EPSS 3.8% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-5763-1 pymatgen security update
Github GHSA Github GHSA GHSA-vgv8-5cpj-qj2f pymatgen vulnerable to arbitrary code execution when parsing a maliciously crafted JonesFaithfulTransformation transformation_string
History
Type Values Removed Values Added
Metrics epss

{'score': 0.32053}

epss

{'score': 0.38327}

Type Values Removed Values Added
First Time appeared Materialsvirtuallab
Materialsvirtuallab pymatgen
CPEs cpe:2.3:a:materialsvirtuallab:pymatgen:*:*:*:*:*:*:*:*
Vendors & Products Materialsvirtuallab
Materialsvirtuallab pymatgen
Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 19, 2024, 7:47 AM
Reserved
Jan 15, 2024, 3:19 PM
Status
Analyzed
Published
Feb 21, 2024, 5:15 PM
Modified
Jun 17, 2026, 7:12 AM