Advisory

PYSEC-2026-909

Also known as: CVE-2022-42964, GHSA-5jqp-885w-xj32

Summary

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

Details

An exponential ReDoS (Regular Expression Denial of Service) can be triggered in the pymatgen PyPI package, when an attacker is able to supply arbitrary input to the GaussianInput.from_string method.

Severity

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

Dates

Published
2026-07-07 10:17 UTC
Modified
2026-07-08 12:00 UTC

Affected packages and fixes

pymatgen

PyPI · All systems

Affected

  • introduced 0, fixed 2025.10.7 (ecosystem)

Fixed versions

2025.10.7

Fix

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

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