{"id":"CVE-2024-23346","aliases":["GHSA-vgv8-5cpj-qj2f","PYSEC-2024-226"],"url":"https://o3.security/vulnerability/CVE-2024-23346","summary":"pymatgen arbitrary code execution when parsing a maliciously crafted JonesFaithfulTransformation transformation_string","details":"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.","published":"2024-02-21T16:13:25.498Z","modified":"2026-07-15T01:48:54.391572948Z","cvss":{"score":9.3,"severity":"CRITICAL","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":4,"affectedPackages":[{"ecosystem":"PyPI","name":"pymatgen","fixedVersion":"2024.2.20"}],"fix":{"url":"https://github.com/materialsproject/pymatgen/commit/c231cbd3d5147ee920a37b6ee9dd236b376bcf5a","label":"materialsproject/pymatgen@c231cbd"},"references":[{"type":"WEB","url":"https://github.com/materialsproject/pymatgen/blob/master/pymatgen/symmetry/settings.py#L97C1-L111C108"},{"type":"WEB","url":"https://www.vicarius.io/vsociety/posts/critical-security-flaw-in-pymatgen-library-cve-2024-23346"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/23xxx/CVE-2024-23346.json"},{"type":"ADVISORY","url":"https://github.com/materialsproject/pymatgen/security/advisories/GHSA-vgv8-5cpj-qj2f"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-23346"},{"type":"FIX","url":"https://github.com/materialsproject/pymatgen/commit/c231cbd3d5147ee920a37b6ee9dd236b376bcf5a"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-15T01:48:54.391572948Z"}}