Skip to content

Bump Jinja2 to >=3.1.6 and MarkupSafe to >=2.1.0 to fix CVEs - #1573

Closed
PraveshKoirala wants to merge 1 commit into
python-openxml:masterfrom
PraveshKoirala:fix/bump-jinja2-to-3.1.6
Closed

Bump Jinja2 to >=3.1.6 and MarkupSafe to >=2.1.0 to fix CVEs#1573
PraveshKoirala wants to merge 1 commit into
python-openxml:masterfrom
PraveshKoirala:fix/bump-jinja2-to-3.1.6

Conversation

@PraveshKoirala

Copy link
Copy Markdown

Summary

  • Bump Jinja2 from ==2.11.3 to >=3.1.6 to resolve four known CVEs
  • Bump MarkupSafe from ==0.23 to >=2.1.0 (required by Jinja2 3.x)

CVEs resolved

CVE Description Fixed in
CVE-2024-22195 XSS via xmlattr filter accepting keys with spaces 3.1.3
CVE-2024-34064 XSS via xmlattr filter (keys with /, >, =) 3.1.4
CVE-2024-56326 Sandbox breakout via indirect reference to str.format 3.1.5
CVE-2025-27516 Sandbox breakout via ` attr` filter selecting format method

Context

These are dev-only dependencies (used for documentation generation via Sphinx), not runtime dependencies. The existing Dependabot PR #1322 targets Jinja2 3.1.3 which still leaves CVE-2024-56326 and CVE-2025-27516 unpatched.

Note

Sphinx==1.8.6 may also need to be bumped for full compatibility with Jinja2 3.x. Happy to update this PR if needed.

🤖 Generated with Claude Code

Jinja2 2.11.3 is affected by four CVEs:
- CVE-2024-22195: XSS via xmlattr filter (fixed in 3.1.3)
- CVE-2024-34064: XSS via xmlattr filter keys (fixed in 3.1.4)
- CVE-2024-56326: Sandbox breakout via str.format (fixed in 3.1.5)
- CVE-2025-27516: Sandbox breakout via attr filter (fixed in 3.1.6)

Bump Jinja2 from ==2.11.3 to >=3.1.6 to resolve all four.
Bump MarkupSafe from ==0.23 to >=2.1.0 as required by Jinja2 3.x.

Note: Sphinx==1.8.6 may need updating for Jinja2 3.x compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@PraveshKoirala
PraveshKoirala deleted the fix/bump-jinja2-to-3.1.6 branch August 1, 2026 02:36
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.

1 participant