CVE Explore

RCE in Materialsproject Pymatgen

CVE-2024-23346

CVSS v3
9.3 Critical
Public exploits
5 repositories
EPSS
0.038 · 90.3th percentile
Published
2024-02-21

What to do

Fixed in
2024.2.20
Affected
2 affected products

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.

Vulnerability class: Command Injection (OS Command Injection)

Published · last modified .

CVSS v3 metric

CVSS v3 base score 9.3 (Critical). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.

EPSS exploit prediction

EPSS 0.038, 90.3th percentile (last changed ); unchanged over 30 days. About EPSS.

Affected products

Weakness classification (CWE)

Public exploits and proof-of-concept code

5 public repositories with exploit or proof-of-concept code for this CVE:

  • DAVIDAROCA27/CVE-2024-23346-exploit (4 stars, last pushed 2025-07-26): 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 (4 stars, last pushed 2025-03-11): 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 stars, last pushed 2025-04-16): PoC of the vulnerability CVE-2024-23346
  • MAWK0235/CVE-2024-23346 (last pushed 2025-06-11): This is an exploit for CVE-2024-23346 that acts as a "terminal" (tested on chemistry.htb)
  • szyth/CVE-2024-23346-rust-exploit (last pushed 2025-02-28): A Rust exploit for CVE-2024-23346 that functions as a "terminal" (tested on chemistry.htb)

Also mentioned in 8 other repositories (anneelv/htb-chemistry, ARPSyndicate/cve-scores, igorbf495/writeup-chemistry-htb, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.

References