CVE-2024-23346 json
pymatgen arbitrary code execution when parsing a maliciously crafted JonesFaithfulTransformation transformation_string
published 2024-02-21 2 y ago modified 2026-06-17 4 mo ago also EUVD-2024-0203 , GHSA-vgv8-5cpj-qj2f , PYSEC-2024-226
- cvss
- 9.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.8%
- EPSS 3.8% chance of exploitation in 30 days, percentile 90%
- public exploits
- 1
- Exploit-DB
Summary
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.
Patch / fix
- pypi pymatgen 2024.2.20
- pymatgen pymatgen 2024.2.20
- pymatgen Debian 12 2022.11.7+dfsg1-11+deb12u1
- pymatgen Debian 13 2024.1.27+dfsg1-6
debian advisories DEBIAN-CVE-2024-23346
Timeline
- Published
- First public exploit (EDB-52205)
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
3.85% chance of exploitation in the next 30 days, higher than 90% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- EDB-52205 Pymatgen 2024.1 - Remote Code Execution (RCE) remote, 2025-04-15
- github.com https://github.com/materialsproject/pymatgen/security/advisories/GHSA-vgv8-5cpj-qj2f referenced PoC, tagged "exploit" by a source, unverified
- vicarius.io https://www.vicarius.io/vsociety/posts/critical-security-flaw-in-pymatgen-library-cve-2024-23346 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 9.4 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| GitHub | 3.1 | 9.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pymatgen | <2024.2.20 |
2024.2.20 |
Affected products
- materialsproject pymatgen
- pymatgen pymatgen
Classification
- Weakness
-
- CWE-77 Improper Neutralization of Special Elements used in a Command
References
-
github.com
/materialsproject/pymatgen/commit/c231cbd3d5147ee920a37b6ee9dd236b376bcf5a
web, patch
-
github.com
/materialsproject/pymatgen/security/advisories/GHSA-vgv8-5cpj-qj2f
web, exploit, vendor-advisory, advisory, evidence
-
vicarius.io
/vsociety/posts/critical-security-flaw-in-pymatgen-library-cve-2024-23346
web, exploit, third-party-advisory, evidence
-
github.com
/materialsproject/pymatgen/blob/master/pymatgen/symmetry/settings.py#L97C1-L111C108
web, broken-link
-
nvd.nist.gov
/vuln/detail/CVE-2024-23346
advisory
-
github.com
/materialsproject/pymatgen
package
-
github.com
/pypa/advisory-database/tree/main/vulns/pymatgen/PYSEC-2024-226.yaml
web
-
github.com
/advisories/GHSA-vgv8-5cpj-qj2f
advisory
Sources
- CVE List CVE-2024-23346
- GitHub Advisory GHSA-vgv8-5cpj-qj2f
- NVD CVE-2024-23346
- OSV PYSEC-2024-226
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.