Intel

AIKIDO-2025-10697

pymatgen is vulnerable to Regular Expression Denial of Service (ReDoS)

Regular Expression Denial of Service (ReDoS)CVE-2022-42964 Published Oct 9, 2025

30

Low Risk

This Affects:

PYTHONpymatgen
0.0.1 - 2025.10.6
Fixed in 2025.10.7
Are you affected? Scan for Free

TL;DR

Affected versions of pymatgen are vulnerable to an exponential regular-expression denial-of-service (ReDoS) in GaussianInput.from_string. An attacker who can supply crafted input to that method can trigger catastrophic backtracking in the library’s regex, causing excessive CPU usage and potentially rendering the process unresponsive.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

pymatgen is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 0.0.1 - 2025.10.6.

How to fix this

Upgrade the pymatgen library to the patch version.