CVE-2022-40896
MEDIUM 5.5CVSS 3.1Pygments vulnerable to ReDoS
A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.
- Published
- 19 Jul 2023
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-434
- Also known as
- GHSA-mrwq-x4v8-fh7pPYSEC-2023-117
- Sources
- NVDJSONOSV GHSA-mrwq-x4v8-fh7pJSONOSV PYSEC-2023-117JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | pygments | pygmentscpe:2.3:a:pygments:pygments:*:*:*:*:*:*:*:* |
<= 2.15.0 | |
| OSV | PyPI | pygments | < 2.15.0 | 2.15.0 |
| OSV | PyPI | pygments | < 2.15.1 | 2.15.1 |
References
- https://github.com/pygments/pygments/blob/master/pygments/lexers/smithy.py#L61 · Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EZGMXALE3HSP4OXC7UUWIKX3OXKZDTY3/ · WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VUZO4BQCIY2S2KZYHERQMKURB7AHXDBO/ · WEB
- https://pypi.org/project/Pygments/ · Product, WEB, PACKAGE
- https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages-part-2/ · Exploit, Patch, Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EZGMXALE3HSP4OXC7UUWIKX3OXKZDTY3/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VUZO4BQCIY2S2KZYHERQMKURB7AHXDBO/
- https://nvd.nist.gov/vuln/detail/CVE-2022-40896 · ADVISORY
- https://github.com/pygments/pygments/commit/97eb3d5ec7c1b3ea4fcf9dee30a2309cf92bd194 · WEB
- https://github.com/pygments/pygments/commit/dd52102c38ebe78cd57748e09f38929fd283ad04 · WEB
- https://github.com/pygments/pygments/commit/fdf182a7af85b1deeeb637ca970d31935e7c9d52 · WEB
- https://github.com/pygments/pygments · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/pygments/PYSEC-2023-117.yaml · WEB
- https://github.com/advisories/GHSA-mrwq-x4v8-fh7p · ADVISORY
History
- 25 Nov 2026 20:36 UTC · NVD: first stored (published 19 Jul 2023)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 19 Jul 2023)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 19 Jul 2023)