CVE-2024-23346
A critical security vulnerability exists in the `JonesFaithfulTransformation.from_transformation_str()` method within the `pymatgen` library prior to version 2024.2.20.
Does this matter?
A public exploit is published in Exploit-DB and the impact is high, while EPSS rates exploitation at 3.8%. Anyone can run this; patch or mitigate before the next change window and check exposed instances for signs of use.
Description
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.
- CVSS 3.1
- 7.8 HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS
- 3.85% probability · 90th percentile
- Public exploits
- 1 in Exploit-DB · first 15 April 2025
- CISA KEV
- Not listed
- Weakness
- CWE-77: Command injection
- Affected
- materialsvirtuallab/pymatgen
- Source
- security-advisories@github.com
In plain terms
It needs a foothold on the machine first, so it matters most as the second step of an attack: turning limited access into more.
- Reached from
- From the machine itself. The attacker needs a session on it, or has to get a user to run something.
- Effort
- Nothing outside the attacker's control has to line up, so an attack can be repeated reliably.
- Login needed
- An ordinary user account.
- Someone else involved
- No. Nobody has to click, open or approve anything.
- At risk
- Reading data: serious. Changing data: serious. Stopping the service: serious.
Read from the CVSS 3.1 vector above. It describes the flaw itself, not how your own systems are set up.
The first public exploit in Exploit-DB is dated 15 April 2025, about 14 months after the record was published.
EPSS moved from 4.9% on 25 November 2026 to 3.8% on 4 December 2026.
Public exploits (1)
Entries in Exploit-DB that cite this CVE. Links go to the Exploit-DB page and to the file in the public repository; nothing is hosted here. A verified tick means the Exploit-DB team confirmed the exploit works against the stated version.
Where to go from here
One vulnerability is rarely the whole question. These are free, and none of them asks for an account.
By email
Our briefing by email: what changed, what to patch and what it means for a UK organisation. Written for the people who have to act on it.
References
- https://github.com/materialsproject/pymatgen/blob/master/pymatgen/symmetry/settings.py#L97C1-L111C108Broken Link
- https://github.com/materialsproject/pymatgen/commit/c231cbd3d5147ee920a37b6ee9dd236b376bcf5aPatch
- https://github.com/materialsproject/pymatgen/security/advisories/GHSA-vgv8-5cpj-qj2fExploit, Vendor Advisory
- https://github.com/materialsproject/pymatgen/blob/master/pymatgen/symmetry/settings.py#L97C1-L111C108Broken Link
- https://github.com/materialsproject/pymatgen/commit/c231cbd3d5147ee920a37b6ee9dd236b376bcf5aPatch
- https://github.com/materialsproject/pymatgen/security/advisories/GHSA-vgv8-5cpj-qj2fExploit, Vendor Advisory
- https://www.vicarius.io/vsociety/posts/critical-security-flaw-in-pymatgen-library-cve-2024-23346Exploit, Third Party Advisory
Source: NVD record, EPSS from FIRST.org, KEV from CISA, exploits from Exploit-DB. Refreshed daily. Download this record as JSON.