chore(deps): update dependency jinja2 to v3.1.4 [security]
Metadata
Current evaluation
Merged PR #4789 as commit 3869f7517, upgrading Jinja2 from 3.1.3 to 3.1.4 to remediate CVE-2024-34064.
Resolution: closed resolved
Reason: PR #4789 was merged into main as commit 3869f7517. It pinned Jinja2 3.1.4, whose xmlattr hardening addresses CVE-2024-34064.
Evaluated by: mr-cal-bot
No scores available.
Issue body
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [Jinja2](https://palletsprojects.com/p/jinja/) ([source](https://togithub.com/pallets/jinja), [changelog](https://jinja.palletsprojects.com/changes/)) | `==3.1.3` -> `==3.1.4` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
### GitHub Vulnerability Alerts
#### [CVE-2024-34064](https://togithub.com/pallets/jinja/security/advisories/GHSA-h75v-3vvj-5mfj)
The `xmlattr` filter in affected versions of Jinja accepts keys containing non-attribute characters. XML/HTML attributes cannot contain spaces, `/`, `>`, or `=`, as each would then be interpreted as starting a separate attribute. If an application accepts keys (as opposed to only values) as user input, and renders these in pages that other users see as well, an attacker could use this to inject other attributes and perform XSS. The fix for the previous GHSA-h5c8-rqwp-cp95 CVE-2024-22195 only addressed spaces but not other characters.
Accepting keys as user input is now explicitly considered an unintended use case of the `xmlattr` filter, and code that does so without otherwise validating the input should be flagged as insecure, regardless of Jinja version. Accepting _values_ as user input continues to be safe.
---
### Release Notes
<details>
<summary>pallets/jinja (Jinja2)</summary>
### [`v3.1.4`](https://togithub.com/pallets/jinja/blob/HEAD/CHANGES.rst#Version-314)
[Compare Source](https://togithub.com/pallets/jinja/compare/3.1.3...3.1.4)
Released 2024-05-05
- The `xmlattr` filter does not allow keys with `/` solidus, `>`
greater-than sign, or `=` equals sign, in addition to disallowing spaces.
Regardless of any validation done by Jinja, user input should never be used
as keys to this filter, or must be separately validated first.
:ghsa:`h75v-3vvj-5mfj`
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "" in timezone Etc/UTC, Automerge - "every weekend" in timezone Etc/UTC.
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/canonical/snapcraft).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #4789 as commit 3869f7517, upgrading Jinja2 from 3.1.3 to 3.1.4 to remediate CVE-2024-34064. | |
| stealth/space-bunny-alpha | — | closed resolved | Renovate security bump of Jinja2 3.1.3 -> 3.1.4 fixing CVE-2024-34064 (xmlattr XSS, GHSA-h75v-3vvj-5mfj) was approved (2 reviewers) and merged as commit 3869f7517, changing 2 files (+2/-2). | |
| stealth/space-bunny-alpha | — | closed resolved | Renovate PR merged as commit 3869f7517, bumping Jinja2 3.1.3 -> 3.1.4 in snapcraft to fix CVE-2024-34064 (xmlattr key injection XSS). Later superseded by 3.1.5 in #5190 and 3.1.6 in #5312. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged as commit 3869f7517, updating Jinja2 from 3.1.3 to 3.1.4 to address CVE-2024-34064 (GHSA-h75v-3vvj-5mfj). | |
| qwen/qwen3.6-35b-a3b | — | — | Merged automated dependency update upgrading Jinja2 from 3.1.3 to 3.1.4 to patch CVE-2024-34064, addressing an XSS vulnerability in the xmlattr filter. Approved and auto-merged by Renovate. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged automated dependency update upgrading Jinja2 from v3.1.3 to v3.1.4 to patch CVE-2024-34064, an XSS vulnerability in the xmlattr filter. Applied via Renovate bot automerge. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1670 chore(deps): update dependency jinja2 to v3.1.4 [security] - autoclosed | charmcraft | closed | Renovate autoclosed unmerged Jinja2 3.1.4 PR #1670; it was superseded by merged Jinja2 3.1.5 PR #2064 (979176de). | |
| #2064 build(deps): update dependency jinja2 to v3.1.5 [security] (main) | charmcraft | merged | Merged PR #2064 via commit 979176de, upgrading Jinja2 from 3.1.4 to 3.1.5 to fix CVE-2024-56326 and CVE-2024-56201. | |
| #5190 build(deps): update dependency jinja2 to v3.1.5 [security] (main) | snapcraft | merged | Merged PR #5190 (commit 98511dc44), upgrading Jinja2 from 3.1.4 to 3.1.5 to address CVE-2024-56326 and CVE-2024-56201. | |
| #275 chore(autogen): bump jinja2 | craft-store | merged | Merged PR #275 (commit c9378f7) bumped jinja2 to 3.1.6 in uv.lock to resolve an OSV advisory. Unrelated minimum-deps test failure fixed separately in #276. | |
| #1486 chore(deps): update bugfixes | charmcraft | merged | Merged PR #1486 as commit b6e26ca8, updating 12 pinned Python dependencies, including Jinja2 3.1.3, cryptography 41.0.7, lxml 4.9.4, and pytest 7.4.4. | |
| #678 chore(autogen): bump jinja2 | craft-application | merged | Merged PR #678 updated Jinja2 to 3.1.6 to address an OSV; resolving commit: 2832f51f. | |
| #4726 chore(deps): update dependency idna to v3.7 [security] | snapcraft | merged | Renovate PR #4726 merged as commit 077ebbfff, pinning idna 3.4/3.6 -> 3.7 to fix CVE-2024-3651 (idna.encode() DoS). Later bumped to 3.10 in #5439. | |
| #5308 build(deps): update dependency jinja2 to v3.1.6 [security] (hotfix/8.6) | snapcraft | closed | Merged into hotfix/8.6, upgrading Jinja2 from 3.1.5 to 3.1.6 to address CVE-2025-27516. | |
| #155 chore: bump jinja2 | craft-archives | merged | Merged PR #155 in commit becbf29, bumping Jinja2 to resolve an OSV advisory. | |
| #5191 build(deps): update dependency jinja2 to v3.1.5 [security] (hotfix/7.5) - autoclosed | snapcraft | closed | Jinja2 3.1.5 hotfix/7.5 PR #5191 was autoclosed unmerged; the equivalent main-branch security update merged via #5190 in commit 98511dc44. |