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

> A local attacker can cause a denial of service in the Pygments library via inefficient regular expressions in the AdlLexer component.

- **Severity:** Medium 4.8 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Mar 2026
- **Updated:** 23 Mar 2026
- **Also known as:** CLEANSTART-2026-AU68896, CLEANSTART-2026-ER46931, DEBIAN-CVE-2026-4539, ECHO-c58f-806e-ab85, GHSA-5239-wwwm-4pmq, MGASA-2026-0090, MINI-5f94-4jcw-69gq, MINI-6453-6vgh-8cwc, MINI-64f3-4hj4-vg3f, MINI-742p-f4ph-jjqp, MINI-88q7-5x4f-qc3x, MINI-9rj4-cqfq-gxmc, MINI-cj4f-rmjj-8vc8, MINI-f6hh-pj8x-9mr5, MINI-g3h7-79q9-2wjp, MINI-g3vh-jww8-8q52, MINI-gfc7-c49r-m8gv, MINI-mp8w-jgq5-5x86, MINI-q4w3-6v5j-f2vm, MINI-v9w3-xr9r-2vxv, MINI-xrm6-r5gm-rjxx, MINI-xvmm-2f47-vqwh, MINI-xvmp-q428-4jcf, OESA-2026-1873, PYSEC-2026-2987, SUSE-SU-2026:1666-1, SUSE-SU-2026:1667-1, SUSE-SU-2026:22058-1, SUSE-SU-2026:22093-1, UBUNTU-CVE-2026-4539, openSUSE-SU-2026:10476-1, openSUSE-SU-2026:20931-1

## What is CVE-2026-4539?

CVE-2026-4539 is a medium-severity denial of service vulnerability in pygments, published on 22 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official 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.

Weakness: CWE-400 (Uncontrolled Resource Consumption), CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2026-4539?

3 open source packages ship an affected version, including pygments and Pygments.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pygments` | PyPI | All versions | 2.20.0 |
| `pygments` | PyPI | All versions | 2.20.0 |
| `Pygments` | PyPI | All versions | 2.20.0 |
| `python-Pygments` | SUSE:Linux Enterprise Server 16.0 | All versions | 2.19.1-160000.3.1 |
| `python-Pygments` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 2.19.1-160000.3.1 |
| `python-Pygments` | SUSE:Linux Micro 6.2 | All versions | 2.19.1-160000.3.1 |
| `python-Pygments` | openSUSE:Leap 16.0 | All versions | 2.19.1-160000.3.1 |
| `python-Pygments` | openSUSE:Tumbleweed | All versions | 2.20.0-2.1 |

## How do I fix CVE-2026-4539?

Upgrade pygments to 2.20.0 or later.

## Is CVE-2026-4539 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-4539 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-4539 and fix it if it is affected.

What it is: CVE-2026-4539 is a medium-severity denial of service vulnerability in pygments, published on 22 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-4539 exists.

Affected packages and fixed versions:
- pygments (PyPI): affected all versions; fixed in 2.20.0
- pygments (PyPI): affected all versions; fixed in 2.20.0
- Pygments (PyPI): affected all versions; fixed in 2.20.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-4539/ (Markdown: https://insights.sbomify.com/CVE-2026-4539/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-4539
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-4539
- OSV: https://osv.dev/vulnerability/CVE-2026-4539

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-4539/
Summaries are generated and may contain mistakes; the official description above is the record.
