CVE-2022-42964
HIGH 7.5CVSS 3.1pymatgen is vulnerable to Regular Expression Denial of Service (ReDoS)
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
- Published
- 9 Nov 2022
- Last modified
- 8 Jul 2026
- Assigned by
- reefs@jfrog.com
- NVD status
- Modified
- Weakness
- CWE-1333
- Also known as
- GHSA-5jqp-885w-xj32PYSEC-2026-909
- Sources
- NVDJSONOSV GHSA-5jqp-885w-xj32JSONOSV PYSEC-2026-909JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | reefs@jfrog.com (Secondary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | PyPA | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | materialsvirtuallab | pymatgencpe:2.3:a:materialsvirtuallab:pymatgen:-:*:*:*:*:*:*:* |
(no version) | |
| OSV | PyPI | pymatgen | <= 2022.9.21 | |
| OSV | PyPI | pymatgen | < 2025.10.7 | 2025.10.7 |
References
- https://research.jfrog.com/vulnerabilities/pymatgen-redos-xray-257184/ · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-42964 · ADVISORY
- https://github.com/materialsproject/pymatgen/issues/2755 · WEB
- https://github.com/materialsproject/pymatgen · PACKAGE
- https://pypi.org/project/pymatgen · PACKAGE
- https://github.com/advisories/GHSA-5jqp-885w-xj32 · ADVISORY
- https://github.com/materialsproject/pymatgen/pull/4476 · FIX
- https://github.com/materialsproject/pymatgen/commit/8d2ca2296109f9e5a4ac1c751eee650ab4303108 · FIX
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 9 Nov 2022)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 10 Nov 2022)