{"id":"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.","aliases":["GHSA-vgv8-5cpj-qj2f","PYSEC-2024-226"],"modified":"2026-04-10T05:10:35.310285Z","published":"2024-02-21T16:13:25.498Z","database_specific":{"cwe_ids":["CWE-77"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/23xxx/CVE-2024-23346.json","cna_assigner":"GitHub_M"},"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"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/materialsproject/pymatgen","events":[{"introduced":"0"},{"fixed":"013ccb54a4f39f1ed4ac3ada690428a3c609731f"}]}],"versions":["test_tag","v1.0.2","v1.1.1","v1.1.2","v1.2.0","v1.2.1","v1.2.3","v1.2.4","v1.2.5","v1.2.6","v1.2.7","v1.2.8","v1.2.9","v1.3.0","v1.3.1","v1.3.2","v1.4.0","v1.5.0","v2.1.0","v2.1.1","v2.1.2","v2.10.6","v2.6.1","v2.6.2","v2.7.3","v2.7.5","v2.7.6","v2.8.0","v2.8.4","v2.8.6","v2.9.3","v2.9.5","v2017.11.27","v2017.11.30","v2017.11.6","v2017.11.9","v2017.12.15","v2017.12.30","v2017.12.6","v2017.12.8","v2017.6.22","v2017.6.24","v2017.7.4","v2017.8.14","v2017.8.16","v2017.8.20","v2017.8.21","v2017.8.4","v2017.9.1","v2017.9.3","v2018.1.19","v2018.1.29","v2018.10.18","v2018.11.30","v2018.11.6","v2018.2.13","v2018.3.14","v2018.3.2","v2018.4.20","v2018.4.6","v2018.5.14","v2018.5.21","v2018.5.22","v2018.5.3","v2018.6.11","v2018.6.27","v2018.7.17","v2018.8.10","v2018.8.7","v2018.9.1","v2018.9.12","v2018.9.19","v2018.9.30","v2019.1.13","v2019.10.16","v2019.10.2","v2019.10.3","v2019.12.22","v2019.12.3","v2019.2.24","v2019.2.28","v2019.2.4","v2019.3.13","v2019.3.27","v2019.4.11","v2019.5.1","v2019.5.28","v2019.5.8","v2019.7.2","v2019.7.21","v2019.7.30","v2019.8.14","v2019.8.23","v2019.9.12","v2019.9.16","v2019.9.7","v2019.9.8","v2020.1.10","v2020.1.28","v2020.10.20","v2020.11.11","v2020.12.18","v2020.12.31","v2020.3.13","v2020.3.2","v2020.4.29","v2020.6.8","v2020.7.13","v2020.7.14","v2020.7.15","v2020.7.16","v2020.7.18","v2020.7.3","v2020.9.14","v2021.1.28","v2021.2.12","v2021.2.13","v2021.2.14","v2021.2.16","v2021.2.27","v2021.2.8","v2021.3.3","v2021.3.4","v2021.3.5","v2022.0.1","v2022.0.10","v2022.0.11","v2022.0.12","v2022.0.13","v2022.0.14","v2022.0.17","v2022.0.2","v2022.0.3","v2022.0.4","v2022.0.6","v2022.0.7","v2022.0.8","v2022.01.07","v2022.01.08","v2022.01.09","v2022.1.20","v2022.1.24","v2022.1.7","v2022.10.22","v2022.11.1","v2022.11.7","v2022.2.1","v2022.2.10","v2022.2.25","v2022.2.7","v2022.3.22","v2022.3.24","v2022.3.29","v2022.4.19","v2022.5.17","v2022.5.18","v2022.5.18.1","v2022.5.19","v2022.7.19","v2022.7.24","v2022.7.24.1","v2022.7.25","v2022.7.8","v2022.8.23","v2023.05.31","v2023.06.23","v2023.1.20","v2023.1.30","v2023.10.11","v2023.10.3","v2023.10.4","v2023.11.10","v2023.11.12","v2023.2.22","v2023.2.28","v2023.3.10","v2023.3.23","v2023.5.10","v2023.5.8","v2023.6.28","v2023.7.11","v2023.7.14","v2023.7.17","v2023.9.2","v2023.9.25","v2024.1.26","v2024.1.27","v2024.2.8","v3.0.0","v3.0.1","v3.0.10","v3.0.6","v3.0.7","v3.0.8","v4.5.4","v4.5.5","v4.5.6","v4.5.7","v4.6.0","v4.6.1","v4.6.2","v4.7.0","v4.7.1","v4.7.2","v4.7.3","v4.7.4","v4.7.6","v4.7.7"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-23346.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"}]}