<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://cve.radiocsirt.org/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-13T06:22:08.589738+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>csirt@opendfir.org</email>
  </author>
  <link href="https://cve.radiocsirt.org" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://cve.radiocsirt.org/vuln/cve-2024-23346</id>
    <title>CVE-2024-23346 — pymatgen arbitrary code execution when parsing a maliciously crafted JonesFaithfulTransformation transformation_string</title>
    <updated>2026-10-13T06:22:08.591438+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> materialsproject pymatgen, pymatgen</p>
<p>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.</p></div>
    </content>
    <link href="https://cve.radiocsirt.org/vuln/cve-2024-23346"/>
  </entry>
  <entry>
    <id>https://cve.radiocsirt.org/vuln/ghsa-vgv8-5cpj-qj2f</id>
    <title>GHSA-vgv8-5cpj-qj2f — pymatgen vulnerable to arbitrary code execution when parsing a maliciously crafted JonesFaithfulTransformation transfor…</title>
    <updated>2026-10-13T06:22:08.591507+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> PyPI: pymatgen</p>
<p>### Summary
A critical security vulnerability exists in the `JonesFaithfulTransformation.from_transformation_str()` method within the `pymatgen` library. This method insecurely utilizes eval() for processing input, enabling execution of arbitrary code when parsing untrusted input. This can be exploited when parsing a maliciously-created CIF file.</p>
<p>### Details
The cause of the vulnerability is in [pymatgen/symmetry/settings.py#L97C1-L111C108](https://github.com/materialsproject/pymatgen/blob/master/pymatgen/symmetry/settings.py#L97C1-L111C108). The flawed code segment involves a regular expression operation followed by the use of `eval()`.</p>
<p>#### Vulnerable code</p>
<p>```py
basis_change = [
    re.sub(r"(?&lt;=\w|\))(?=\() | (?&lt;=\))(?=\w) | (?&lt;=(\d|a|b|c))(?=([abc]))", r"*", string, flags=re.X)
    for string in basis_change
]
"""snip"""
([eval(x, {"__builtins__": None}, {"a": a, "b": b, "c": c}) for x in basis_change])
```</p>
<p>The use of eval, even with `__builtins__` set to `None`, is still a security risk. The `BuiltinImporter` class can be recovered with subclass traversal.</p>
<p>### PoC</p>
<p>The vulnerability can be exploited as follows:</p>
<p>Create a file `vuln.cif` with the following contents:</p>
<p>```
data_5yOhtAoR
_audit_creation_date            2018-06-08
_audit_creation_method          "Pymatgen CIF Parser Arbitrary Code Execution Exploit"</p>
<p>loop_
_parent_propagation_vector.id
_parent_propagation_vector.kxkykz
k1 [0 0 0]</p>
<p>_space_group_magn.transform_BNS_Pp_abc  'a,b,[d for d in ().__class__.__m…</p></div>
    </content>
    <link href="https://cve.radiocsirt.org/vuln/ghsa-vgv8-5cpj-qj2f"/>
  </entry>
</feed>
