Skip to content

fix(security): bump Jinja2 to >=3.1.6 — fixes CVE-2024-22195, CVE-2024-34064, CVE-2024-56326, CVE-2025-27516 - #1574

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

fix(security): bump Jinja2 to >=3.1.6 — fixes CVE-2024-22195, CVE-2024-34064, CVE-2024-56326, CVE-2025-27516#1574
PraveshKoirala wants to merge 1 commit into
python-openxml:masterfrom
PraveshKoirala:fix/bump-jinja2-to-3.1.6

Conversation

@PraveshKoirala

@PraveshKoirala PraveshKoirala commented Aug 1, 2026

Copy link
Copy Markdown

Jinja2 2.11.3 (currently pinned in [dependency-groups] dev) is affected by four CVEs:

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 3.1.6

Changes:

  • Jinja2 from ==2.11.3 to >=3.1.6
  • MarkupSafe from ==0.23 to >=2.1.0 (required by Jinja2 3.x)

All tests pass on Python 3.12: 1609 pytest, 650 behave scenarios.

Supersedes #1322 which only bumps to 3.1.3 (missing two later CVEs).

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)

MarkupSafe bumped from ==0.23 to >=2.1.0 as required by Jinja2 3.x.

All tests pass (1609 pytest, 650 behave scenarios) on Python 3.12.
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