---
title: "CVE-2024-23346: pymatgen vulnerable to arbitrary code execution when parsing a maliciously crafted JonesFaithfulTransformation transformation_string"
url: https://erroneo.us/security/cve/CVE-2024-23346/
description: "CVE-2024-23346 (pymatgen (PyPI)): Pymatgen (Python Materials Genomics) is an open-source Python library for materials analysis. A critical security…"
type: vulnerability-record
section: "Security Digest"
date_published: 2024-02-21
date_modified: 2026-03-18
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2024-23346"
kev: false
cvss: 9.4
epss: 0.03816
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2024-23346: pymatgen vulnerable to arbitrary code execution when parsing a maliciously crafted JonesFaithfulTransformation transformation_string

**Signal:** Critical, preconditions apply. Severe if exploited, but exploitation needs conditions that may not apply to you. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 3.8% , percentile 90: FIRST’s model estimates a 3.8% chance of exploitation activity in the next 30 days, higher than 90% of all scored CVEs (elevated). EPSS is a probability, not a verdict.
- Needs local access needed. Lower urgency for most teams unless an attacker could already run code on the machine.
- Only applies if your dependency tree includes pymatgen (PyPI) < 2024.2.20, fixed in 2024.2.20 . Check your lockfile, including transitive dependencies.

## What it is

Pymatgen (Python Materials Genomics) is an open-source Python library for materials analysis. A critical security vulnerability exists in the JonesFaithfulTransformation.fromtransformationstr() 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 packages

- PyPI `pymatgen` < 2024.2.20 → fixed: 2024.2.20

## Affected products (CVE record)

- materialsproject pymatgen: < 2024.2.20

## Severity

- GitHub_M CVSS 3.1: 9.4 `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- GitHub CVSS 3.1: 9.3 `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable no , technical impact total .
- FIRST EPSS (model of 2026-10-21): 3.82% probability of exploitation activity in the next 30 days; percentile 90.

## Sources

- [GitHub Advisory GHSA-vgv8-5cpj-qj2f](https://github.com/advisories/GHSA-vgv8-5cpj-qj2f)
- [CVE.org record CVE-2024-23346](https://www.cve.org/CVERecord?id=CVE-2024-23346)
- [NVD entry CVE-2024-23346](https://nvd.nist.gov/vuln/detail/CVE-2024-23346)
- [github.com](https://github.com/materialsproject/pymatgen/security/advisories/GHSA-vgv8-5cpj-qj2f)
- [github.com](https://github.com/materialsproject/pymatgen/commit/c231cbd3d5147ee920a37b6ee9dd236b376bcf5a)
- [github.com](https://github.com/materialsproject/pymatgen/blob/master/pymatgen/symmetry/settings.py#L97C1-L111C108)
- [vicarius.io](https://www.vicarius.io/vsociety/posts/critical-security-flaw-in-pymatgen-library-cve-2024-23346)
- [github.com](https://github.com/pypa/advisory-database/tree/main/vulns/pymatgen/PYSEC-2024-226.yaml)

---
Source page: https://erroneo.us/security/cve/CVE-2024-23346/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
