CVE-2024-23346
CRITICAL9.3EPSS 54.9%pymatgen - security update
Published: 2/21/2024Modified: 4/28/2026
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 packages (4)
- Debian/pymatgenfrom 0, < 2022.11.7+dfsg1-11+deb12u1
- Debian/pymatgenfrom 0, < 2022.11.7+dfsg1-11+deb12u1
- PyPI/pymatgenfrom 0, < 2024.2.20
- PyPI/pymatgenfrom 0, < c231cbd3d5147ee920a37b6ee9dd236b376bcf5a, < c231cbd3d5147ee920a37b6ee9dd236b376bcf5a | from 0, < 2024.2.20
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | CRITICAL9.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
References (8)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2024-23346
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2024-23346
- PATCHhttps://github.com/materialsproject/pymatgen
- WEBhttps://github.com/materialsproject/pymatgen/blob/master/pymatgen/symmetry/settings.py#L97C1-L111C108
- WEBhttps://github.com/materialsproject/pymatgen/commit/c231cbd3d5147ee920a37b6ee9dd236b376bcf5a
- WEBhttps://github.com/materialsproject/pymatgen/security/advisories/GHSA-vgv8-5cpj-qj2f
- WEBhttps://github.com/pypa/advisory-database/tree/main/vulns/pymatgen/PYSEC-2024-226.yaml
- WEBhttps://www.vicarius.io/vsociety/posts/critical-security-flaw-in-pymatgen-library-cve-2024-23346