Cloudanix VulnDB

CVE-2026-4539

Low · 3.3

CVSS

3.3

EPSS

0.2%

Published

Mar 22, 2026

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A specially crafted file can make software that highlights certain code formats slow down or stop responding.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
No Fix Yet
Effort
Medium
Patch risk
Low

What it actually does

The flaw is an inefficient regular expression in Pygments' Archetype ADL lexer, specifically the AdlLexer implementation in pygments/lexers/archetype.py. A crafted local input file can trigger excessive regex backtracking during syntax highlighting, causing high CPU consumption, long processing times, worker starvation, or process timeouts. The impact is limited to availability; the issue does not provide code execution, data modification, or data disclosure by itself. The reported affected range is Pygments up to and including 2.19.2, and no fixed version was provided in the supplied data.

Why it matters to the business

Systems that use Pygments to highlight user-controlled or locally supplied Archetype/ADL content may become slow or unavailable when processing malicious input. The most likely consequence is localized denial of service: stalled jobs, exhausted web or CI workers, delayed documentation generation, or degraded developer tooling. Overall public exploitation likelihood is currently low based on the EPSS score, and the issue is not listed in CISA KEV or associated with ransomware, but public exploit information increases the chance of opportunistic testing in exposed workflows.

How an attack unfolds

An attacker who can place or submit content that will be processed by Pygments as Archetype/ADL crafts input designed to trigger worst-case behavior in the vulnerable regular expression. The attacker then causes a local process, web service, CI job, documentation renderer, code browser, or command-line use of pygmentize to syntax-highlight that content with AdlLexer. During lexing, the regex engine spends excessive time attempting matches, consuming CPU and delaying or blocking the process. Repeated submissions can tie up multiple workers and create a denial-of-service condition. Because the vulnerability requires local access or an equivalent ability to influence files or content being highlighted, exposure is highest where Pygments processes untrusted uploads, repository content, tickets, markdown/documentation snippets, or automated build artifacts.

How to fix it

Upgrade Pygments when an upstream fixed version becomes available; the supplied data indicates versions up to 2.19.2 are affected and does not list a fixed release. Until a fix is available, mitigate by preventing untrusted content from being highlighted with the Archetype/ADL lexer, disabling or removing AdlLexer where feasible, restricting automatic lexer detection for untrusted files, and applying strict CPU and wall-clock timeouts around syntax-highlighting operations. Run Pygments in a sandboxed worker with resource limits, queue limits, and process isolation. For web or CI integrations, limit file size, reject suspicious ADL inputs, disable user-controlled lexer selection, and ensure worker processes are killed and restarted after timeout. If the lexer is not needed, remove support for Archetype/ADL highlighting entirely until patched.

How to confirm the fix worked

Inventory installed Pygments versions and flag any installation at or below 2.19.2. Confirm whether applications import or invoke pygments.lexers.archetype.AdlLexer, allow .adl or Archetype files, or perform automatic syntax highlighting on untrusted content. Validate mitigations by confirming that ADL highlighting is disabled, time-limited, sandboxed, or blocked for untrusted inputs. After an upstream patch is released and applied, confirm the runtime imports the patched package version, verify that dependency lockfiles and container images no longer include affected versions, and run regression tests with representative ADL files to ensure highlighting completes within expected time limits.

Typical attack path

  1. Identify an application, job, or toolchain that uses Pygments up to 2.19.2 for syntax highlighting.
  2. Determine whether Archetype/ADL content is accepted or auto-detected, or whether the lexer can be selected explicitly.
  3. Create a specially crafted ADL input that triggers inefficient regex behavior in AdlLexer.
  4. Submit, upload, commit, or place the crafted file where the vulnerable Pygments process will parse it.
  5. Cause the syntax-highlighting path to execute, such as viewing the file, building documentation, running CI, or invoking pygmentize.
  6. Repeat the action or submit multiple crafted files to consume CPU, exhaust workers, and degrade service availability.

How to detect it

Look for evidence that Pygments was asked to process Archetype/ADL content shortly before CPU spikes, application timeouts, worker restarts, or job failures. Relevant log sources include web access logs for file views or uploads, application logs from syntax-highlighting components, CI/CD job logs, documentation build logs, task queue logs, process supervisor logs, container runtime events, and endpoint telemetry showing Python or pygmentize processes consuming excessive CPU. Search for explicit lexer selection of AdlLexer, imports of pygments.lexers.archetype, processing of .adl or Archetype files, and repeated failures or timeouts in the same rendering path. For forensic review, correlate suspicious file submissions or repository commits with long-running python/pygmentize processes, worker SIGKILL/SIGTERM events, request timeouts, and elevated CPU utilization. There are no known named threat actors or ransomware campaigns associated with this issue in the supplied data.

  • pygments/lexers/archetype.py
  • pygments.lexers.archetype
  • AdlLexer
  • pygmentize
  • .adl
  • archetype
  • lexer=adl
  • lexer=archetype
  • pygments.util.ClassNotFound
  • timeout while highlighting
  • syntax highlighting timeout
  • worker timeout
  • process killed after timeout

What your security team should do

  • Inventory all uses of Pygments in applications, CI/CD systems, documentation generators, code browsers, ticketing integrations, and developer tooling.
  • Prioritize systems that process user-supplied files, repository content, markdown, documentation, or uploaded code snippets with syntax highlighting enabled.
  • If Pygments is at or below 2.19.2, disable Archetype/ADL highlighting or block untrusted ADL content until a fixed version is available.
  • Apply CPU, memory, file-size, queue-depth, and wall-clock time limits around Pygments execution, especially in shared worker pools.
  • Monitor for abnormal CPU spikes, repeated highlighting timeouts, killed workers, and suspicious use of the Archetype/ADL lexer.
  • Track upstream Pygments advisories and upgrade promptly once a patched release is published.
  • Because a public exploit exists despite low EPSS and no KEV listing, treat internet-facing or multi-tenant content-rendering paths as higher priority than local-only developer workstations.

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Chainguard airflow-2 0 2.11.2-r4
Chainguard airflow-3 0 3.1.8-r10
Chainguard airflow-core-2 0 2.11.2-r2
Chainguard airflow-core-3 0 3.1.8-r2
Chainguard apache-beam-python-3.11-sdk 0 2.72.0-r0
Chainguard apache-beam-python-3.12-sdk 0 2.72.0-r0
Chainguard apache-beam-python-3.13-sdk 0 2.72.0-r0
Chainguard az 0 2.84.0-r4
Chainguard dask-kubernetes 0 2026.3.0-r2
Chainguard datahub-ingestion-fips 0 1.5.0.1-r1
Chainguard ggshield 0 1.49.0-r0
Chainguard jupyter-base-notebook 0 7.5.5-r1
Chainguard kserve-storage-controller 0 0.16.0-r24
Chainguard label-studio 0 1.23.0-r2
Chainguard litellm 0 1.82.3.0-r2
Chainguard mycli 0 1.67.1-r1
Chainguard neuvector-manager-cli 0 5.5.0-r2
Chainguard opal 0 0.9.4-r0
Chainguard open-webui 0 0.8.12-r2
Chainguard pgadmin4 0 9.13-r3
Chainguard pgadmin4-fips 0 9.13-r2
Chainguard py3.10-pygments 0 2.20.0-r0
Chainguard py3.11-prefect 0 3.6.24-r1
Chainguard py3.11-prefect-fips 0 3.6.24-r0
Chainguard py3.11-pygments 0 2.20.0-r0
Chainguard py3.12-prefect 0 3.6.24-r1
Chainguard py3.12-prefect-fips 0 3.6.24-r0
Chainguard py3.12-pygments 0 2.20.0-r0
Chainguard py3.13-prefect 0 3.6.24-r1
Chainguard py3.13-prefect-fips 0 3.6.24-r0
Chainguard py3.13-pygments 0 2.20.0-r0
Chainguard py3.14-prefect 0 3.6.24-r1
Chainguard py3.14-pygments 0 2.20.0-r0
Chainguard reflex 0 0.8.28-r2
Chainguard semgrep 0 1.157.0-r1
Chainguard superset-5.0 0 5.0.0-r22
Chainguard superset-6.0 0 6.0.0-r7
Chainguard tritonserver-backend-vllm-cuda-13.0 0 25.11-r3
Wolfi airflow-3 0 3.1.8-r10
Wolfi az 0 2.84.0-r4
Wolfi dask-kubernetes 0 2026.3.0-r2
Wolfi ggshield 0 1.49.0-r0
Wolfi jupyter-base-notebook 0 7.5.5-r1
Wolfi kserve-storage-controller 0 0.16.0-r24
Wolfi mycli 0 1.67.1-r1
Wolfi neuvector-manager-cli 0 5.5.0-r2
Wolfi open-webui 0 0.8.12-r2
Wolfi py3.10-pygments 0 2.20.0-r0
Wolfi py3.11-pygments 0 2.20.0-r0
Wolfi py3.12-pygments 0 2.20.0-r0
Wolfi py3.13-pygments 0 2.20.0-r0
Wolfi py3.14-pygments 0 2.20.0-r0
Wolfi reflex 0 0.8.28-r2
Wolfi semgrep 0 1.157.0-r1
Wolfi superset-5.0 0 5.0.0-r22
Wolfi superset-6.0 0 6.0.0-r7
openSUSE:Leap 16.0 python-Pygments 0 2.19.1-160000.3.1
openSUSE:Tumbleweed python-Pygments 0 2.20.0-2.1

Related vulnerabilities