Skip to content

fix: loosen pygments dependency to >=2.16 to allow CVE-2026-4539 fix#338

Open
einarwar wants to merge 1 commit intobackstage:mainfrom
einarwar:fix/loosen-pygments-dependency
Open

fix: loosen pygments dependency to >=2.16 to allow CVE-2026-4539 fix#338
einarwar wants to merge 1 commit intobackstage:mainfrom
einarwar:fix/loosen-pygments-dependency

Conversation

@einarwar
Copy link
Copy Markdown

Summary

Moves pygments from an exact pin (==2.19.2) to a range constraint (>=2.16) in the peer dependencies section of requirements.txt.

Motivation

pygments 2.20.0 was released to fix CVE-2026-4539. The previous exact pin prevented downstream projects from upgrading to the patched release, causing pip-audit to flag the vulnerability with no available workaround.

Changes

  • Moved pygments from the "direct dependencies" section (exact pin) to the "peer dependencies" section (range), consistent with how mkdocs and Markdown are already handled.
  • The lower bound >=2.16 matches mkdocs-material's own requirement for pygments.
  • pygments is not directly imported by techdocs-core — it's a transitive dependency of mkdocs-material (hard dep) and pymdown-extensions (optional extra). A range constraint is more appropriate than an exact pin.

Fixes #334

Move pygments from an exact pin to a range constraint in the peer
dependencies section. This allows downstream projects to upgrade to
pygments 2.20.0+ which fixes CVE-2026-4539.

The lower bound of >=2.16 matches mkdocs-material's own requirement.

Fixes backstage#334
@einarwar einarwar requested review from a team and awanlin as code owners April 10, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support pygments>=2.20.0 (CVE-2026-4539)

1 participant