CVE-2024-23346
HIGH 7.8CVSS 3.1pymatgen vulnerable to arbitrary code execution when parsing a maliciously crafted JonesFaithfulTransformation transformation_string
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
- 21 Feb 2024
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-77
- Also known as
- GHSA-vgv8-5cpj-qj2fPYSEC-2024-226
- Sources
- NVDJSONOSV GHSA-vgv8-5cpj-qj2fJSONOSV PYSEC-2024-226JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | CRITICAL 9.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | materialsvirtuallab | pymatgencpe:2.3:a:materialsvirtuallab:pymatgen:*:*:*:*:*:*:*:* |
< 2024.2.20 | 2024.2.20 |
| OSV | PyPI | pymatgen | < 2024.2.20 | 2024.2.20 |
References
- https://github.com/materialsproject/pymatgen/blob/master/pymatgen/symmetry/settings.py#L97C1-L111C108 · Broken Link, WEB
- https://github.com/materialsproject/pymatgen/commit/c231cbd3d5147ee920a37b6ee9dd236b376bcf5a · Patch, WEB, FIX
- https://github.com/materialsproject/pymatgen/security/advisories/GHSA-vgv8-5cpj-qj2f · Exploit, Vendor Advisory, WEB, ADVISORY, EVIDENCE
- https://www.vicarius.io/vsociety/posts/critical-security-flaw-in-pymatgen-library-cve-2024-23346 · Exploit, Third Party Advisory, WEB, EVIDENCE
- https://nvd.nist.gov/vuln/detail/CVE-2024-23346 · ADVISORY
- https://github.com/materialsproject/pymatgen · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/pymatgen/PYSEC-2024-226.yaml · WEB
- https://github.com/advisories/GHSA-vgv8-5cpj-qj2f · ADVISORY
History
- 25 Nov 2026 20:54 UTC · NVD: first stored (published 21 Feb 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 21 Feb 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 21 Feb 2024)