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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| materialsproject | pymatgen | < 2024.2.20 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 13 | pymatgen | 2024.1.27+dfsg1-6 | — |
| Debian 12 | pymatgen | 2022.11.7+dfsg1-11+deb12u1 | DSA-5763-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | pymatgen | No fix yet | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- Pymatgen 2024.1 - Remote Code Execution (RCE) EDB-52205 · remote · Apr 15, 2025
GitHub 5 repositories
-
DAVIDAROCA27/CVE-2024-23346-exploit ★ 4 · Jul 24, 2025
This is a exploit for the known Remote Code Execution (RCE) vulnerability in the `pymatgen` (CVE-2024-23346) Python library by uploading a malicious `CIF` file to the hosted `CIF Analyzer` website on…
-
9carlo6/CVE-2024-23346 ★ 3 · Nov 5, 2024
This repository contains a Crystallographic Information File (CIF) intended for use on the "Chemistry" machine on Hack The Box (HTB).
-
Sanity-Archive/CVE-2024-23346 ★ 2 · Feb 20, 2025
PoC of the vulnerability CVE-2024-23346
-
szyth/CVE-2024-23346-rust-exploit ★ 0 · Feb 25, 2025
A Rust exploit for CVE-2024-23346 that functions as a "terminal" (tested on chemistry.htb)
-
MAWK0235/CVE-2024-23346 ★ 0 · Dec 9, 2024
This is an exploit for CVE-2024-23346 that acts as a "terminal" (tested on chemistry.htb)
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | pymatgen | < 2024.2.20 | 2024.2.20 | GHSA-vgv8-5cpj-qj2f |
Advisories 1
- DSA-5763-1 pymatgen - security update Debian Security (DSA / DLA) · Mar 9, 2026