Advisory

PYSEC-2024-226

Also known as: CVE-2024-23346, GHSA-vgv8-5cpj-qj2f

Summary

The record has no summary.

Details

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.

Severity

High Basis: CVSS v3 score 7.8, vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Dates

Published
2024-02-21 17:15 UTC
Modified
2026-06-10 17:14 UTC

Affected packages and fixes

pymatgen

PyPI · All systems

Affected

  • introduced 0, fixed 2024.2.20 (ecosystem)

Fixed versions

2024.2.20

Fix

  • Fixed version 2024.2.20
    pip install --upgrade pymatgen==2024.2.20

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences