Skip to content
Fencer Vulns
critical 9.4

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

  1. Published
  2. 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

Sources

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.