{"id":"CVE-2024-23346","published":"2024-02-21T16:13:25Z","modified":"2024-08-19T07:47:59Z","title":"pymatgen arbitrary code execution when parsing a maliciously crafted JonesFaithfulTransformation transformation_string","vendor":"materialsproject","product":"pymatgen","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.4,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.03848,"percentile":0.90389,"provenance":"source"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"references":[{"url":"https://github.com/materialsproject/pymatgen/security/advisories/GHSA-vgv8-5cpj-qj2f","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/materialsproject/pymatgen/commit/c231cbd3d5147ee920a37b6ee9dd236b376bcf5a","tags":["x_refsource_MISC"]},{"url":"https://github.com/materialsproject/pymatgen/blob/master/pymatgen/symmetry/settings.py#L97C1-L111C108","tags":["x_refsource_MISC"]},{"url":"https://www.vicarius.io/vsociety/posts/critical-security-flaw-in-pymatgen-library-cve-2024-23346","tags":[]}],"priority":{"score":29.7,"factors":[{"name":"EPSS percentile","points":18.08},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.58}]},"exploitSources":{"exploitdb":{"count":1,"earliest":"2025-04-15"},"pocGithub":{"count":5,"skipped":0,"earliest":"2024-11-05","earliestUrl":"https://github.com/9carlo6/CVE-2024-23346","repos":[{"name":"9carlo6/CVE-2024-23346","url":"https://github.com/9carlo6/CVE-2024-23346","stars":4,"created":"2024-11-05"},{"name":"DAVIDAROCA27/CVE-2024-23346-exploit","url":"https://github.com/DAVIDAROCA27/CVE-2024-23346-exploit","stars":4,"created":"2025-07-24"},{"name":"Sanity-Archive/CVE-2024-23346","url":"https://github.com/Sanity-Archive/CVE-2024-23346","stars":2,"created":"2025-02-20"},{"name":"MAWK0235/CVE-2024-23346","url":"https://github.com/MAWK0235/CVE-2024-23346","stars":0,"created":"2024-12-09"},{"name":"szyth/CVE-2024-23346-rust-exploit","url":"https://github.com/szyth/CVE-2024-23346-rust-exploit","stars":0,"created":"2025-02-25"}]},"first":{"date":"2024-11-05","source":"PoC-in-GitHub","url":"https://github.com/9carlo6/CVE-2024-23346"},"provenance":"source"},"vendorSlug":"materialsproject","affectedVersions":[{"vendor":"materialsproject","product":"pymatgen","versions":["< 2024.2.20"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2024-02-21T18:18:22.669875Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pymatgen","vulnerableRanges":["<2024.2.20"],"patched":["2024.2.20"],"from":["GHSA-vgv8-5cpj-qj2f","PYSEC-2024-226"],"provenance":"source"}],"summary":{"text":"The pymatgen materials analysis library contains a flaw in the JonesFaithfulTransformation.from_transformation_str() method, which uses eval() on input and so executes arbitrary code when it parses untrusted input; versions before 2024.2.20 are affected. An attacker with local access and no privileges can cause code to run in the context of the process parsing the crafted transformation_string, with no user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T04:02:38Z"},"euvd":{"id":"EUVD-2024-0203","exploited":false,"provenance":"source"},"exploits":[{"id":52205,"url":"https://www.exploit-db.com/exploits/52205","title":"Pymatgen 2024.1 - Remote Code Execution (RCE)","date":"2025-04-15","verified":false,"provenance":"source"}]}