Update dependency jinja2 to >=3.1.6 [SECURITY] #3

Merged
cdamian merged 0 commits from refs/pull/3/head into main 2026-06-13 20:36:51 +02:00
cdamian commented 2026-06-13 20:29:11 +02:00 (Migrated from codeberg.org)

This PR contains the following updates:

Package Change Age Confidence
jinja2 (changelog) >=3.1>=3.1.6 age confidence

Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter

CVE-2024-22195 / GHSA-h5c8-rqwp-cp95

More information

Details

The xmlattr filter in affected versions of Jinja accepts keys containing spaces. XML/HTML attributes cannot contain spaces, as each would then be interpreted as 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. Note that accepting keys as user input is not common or a particularly intended use case of the xmlattr filter, and an application doing so should already be verifying what keys are provided regardless of this fix.

Severity

  • CVSS Score: 5.4 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter

CVE-2024-34064 / GHSA-h75v-3vvj-5mfj

More information

Details

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.

Severity

  • CVSS Score: 5.4 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Jinja has a sandbox breakout through malicious filenames

CVE-2024-56201 / GHSA-gmj6-6f8f-6699

More information

Details

A bug in the Jinja compiler allows an attacker that controls both the content and filename of a template to execute arbitrary Python code, regardless of if Jinja's sandbox is used.

To exploit the vulnerability, an attacker needs to control both the filename and the contents of a template. Whether that is the case depends on the type of application using Jinja. This vulnerability impacts users of applications which execute untrusted templates where the template author can also choose the template filename.

Severity

  • CVSS Score: 5.4 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Jinja has a sandbox breakout through indirect reference to format method

CVE-2024-56326 / GHSA-q2x7-8rv6-6q7h

More information

Details

An oversight in how the Jinja sandboxed environment detects calls to str.format allows an attacker that controls the content of a template to execute arbitrary Python code.

To exploit the vulnerability, an attacker needs to control the content of a template. Whether that is the case depends on the type of application using Jinja. This vulnerability impacts users of applications which execute untrusted templates.

Jinja's sandbox does catch calls to str.format and ensures they don't escape the sandbox. However, it's possible to store a reference to a malicious string's format method, then pass that to a filter that calls it. No such filters are built-in to Jinja, but could be present through custom filters in an application. After the fix, such indirect calls are also handled by the sandbox.

Severity

  • CVSS Score: 5.4 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Jinja2 vulnerable to sandbox breakout through attr filter selecting format method

CVE-2025-27516 / GHSA-cpwx-vrp4-4pq7

More information

Details

An oversight in how the Jinja sandboxed environment interacts with the |attr filter allows an attacker that controls the content of a template to execute arbitrary Python code.

To exploit the vulnerability, an attacker needs to control the content of a template. Whether that is the case depends on the type of application using Jinja. This vulnerability impacts users of applications which execute untrusted templates.

Jinja's sandbox does catch calls to str.format and ensures they don't escape the sandbox. However, it's possible to use the |attr filter to get a reference to a string's plain format method, bypassing the sandbox. After the fix, the |attr filter no longer bypasses the environment's attribute lookup.

Severity

  • CVSS Score: 5.4 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).

Important

Release Notes retrieval for this PR were skipped because no github.com credentials were available.
If you are self-hosted, please see this instruction.


Configuration

📅 Schedule: (in timezone Europe/Madrid)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [jinja2](https://github.com/pallets/jinja) ([changelog](https://jinja.palletsprojects.com/changes/)) | `>=3.1` → `>=3.1.6` | ![age](https://developer.mend.io/api/mc/badges/age/pypi/jinja2/3.1.6?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/jinja2/3.1.0/3.1.6?slim=true) | --- ### Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter [CVE-2024-22195](https://nvd.nist.gov/vuln/detail/CVE-2024-22195) / [GHSA-h5c8-rqwp-cp95](https://github.com/advisories/GHSA-h5c8-rqwp-cp95) <details> <summary>More information</summary> #### Details The `xmlattr` filter in affected versions of Jinja accepts keys containing spaces. XML/HTML attributes cannot contain spaces, as each would then be interpreted as 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. Note that accepting keys as user input is not common or a particularly intended use case of the `xmlattr` filter, and an application doing so should already be verifying what keys are provided regardless of this fix. #### Severity - CVSS Score: 5.4 / 10 (Medium) - Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N` #### References - [https://github.com/pallets/jinja/security/advisories/GHSA-h5c8-rqwp-cp95](https://github.com/pallets/jinja/security/advisories/GHSA-h5c8-rqwp-cp95) - [https://nvd.nist.gov/vuln/detail/CVE-2024-22195](https://nvd.nist.gov/vuln/detail/CVE-2024-22195) - [https://github.com/pallets/jinja/commit/716795349a41d4983a9a4771f7d883c96ea17be7](https://github.com/pallets/jinja/commit/716795349a41d4983a9a4771f7d883c96ea17be7) - [https://github.com/pallets/jinja](https://github.com/pallets/jinja) - [https://github.com/pallets/jinja/releases/tag/3.1.3](https://github.com/pallets/jinja/releases/tag/3.1.3) - [https://lists.debian.org/debian-lts-announce/2024/01/msg00010.html](https://lists.debian.org/debian-lts-announce/2024/01/msg00010.html) - [https://lists.debian.org/debian-lts-announce/2024/12/msg00009.html](https://lists.debian.org/debian-lts-announce/2024/12/msg00009.html) - [https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5XCWZD464AJJJUBOO7CMPXQ4ROBC6JX2](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5XCWZD464AJJJUBOO7CMPXQ4ROBC6JX2) - [https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DELCVUUYX75I5K4Q5WMJG4MUZJA6VAIP](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DELCVUUYX75I5K4Q5WMJG4MUZJA6VAIP) - [https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O7YWRBX6JQCWC2XXCTZ55C7DPMGICCN3](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O7YWRBX6JQCWC2XXCTZ55C7DPMGICCN3) This data is provided by [OSV](https://osv.dev/vulnerability/GHSA-h5c8-rqwp-cp95) and the [GitHub Advisory Database](https://github.com/github/advisory-database) ([CC-BY 4.0](https://github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter [CVE-2024-34064](https://nvd.nist.gov/vuln/detail/CVE-2024-34064) / [GHSA-h75v-3vvj-5mfj](https://github.com/advisories/GHSA-h75v-3vvj-5mfj) <details> <summary>More information</summary> #### Details 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. #### Severity - CVSS Score: 5.4 / 10 (Medium) - Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N` #### References - [https://github.com/pallets/jinja/security/advisories/GHSA-h75v-3vvj-5mfj](https://github.com/pallets/jinja/security/advisories/GHSA-h75v-3vvj-5mfj) - [https://nvd.nist.gov/vuln/detail/CVE-2024-34064](https://nvd.nist.gov/vuln/detail/CVE-2024-34064) - [https://github.com/pallets/jinja/commit/0668239dc6b44ef38e7a6c9f91f312fd4ca581cb](https://github.com/pallets/jinja/commit/0668239dc6b44ef38e7a6c9f91f312fd4ca581cb) - [https://github.com/pallets/jinja](https://github.com/pallets/jinja) - [https://lists.debian.org/debian-lts-announce/2024/12/msg00009.html](https://lists.debian.org/debian-lts-announce/2024/12/msg00009.html) - [https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/567XIGSZMABG6TSMYWD7MIYNJSUQQRUC](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/567XIGSZMABG6TSMYWD7MIYNJSUQQRUC) - [https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GCLF44KY43BSVMTE6S53B4V5WP3FRRSE](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GCLF44KY43BSVMTE6S53B4V5WP3FRRSE) - [https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SSCBHIL6BYKR5NRCBXP4XMP2CEEKGFVS](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SSCBHIL6BYKR5NRCBXP4XMP2CEEKGFVS) - [https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZALNWE3TXPPHVPSI3AZ5CTMSTAVN5UMS](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZALNWE3TXPPHVPSI3AZ5CTMSTAVN5UMS) This data is provided by [OSV](https://osv.dev/vulnerability/GHSA-h75v-3vvj-5mfj) and the [GitHub Advisory Database](https://github.com/github/advisory-database) ([CC-BY 4.0](https://github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Jinja has a sandbox breakout through malicious filenames [CVE-2024-56201](https://nvd.nist.gov/vuln/detail/CVE-2024-56201) / [GHSA-gmj6-6f8f-6699](https://github.com/advisories/GHSA-gmj6-6f8f-6699) <details> <summary>More information</summary> #### Details A bug in the Jinja compiler allows an attacker that controls both the content and filename of a template to execute arbitrary Python code, regardless of if Jinja's sandbox is used. To exploit the vulnerability, an attacker needs to control both the filename and the contents of a template. Whether that is the case depends on the type of application using Jinja. This vulnerability impacts users of applications which execute untrusted templates where the template author can also choose the template filename. #### Severity - CVSS Score: 5.4 / 10 (Medium) - Vector String: `CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N` #### References - [https://github.com/pallets/jinja/security/advisories/GHSA-gmj6-6f8f-6699](https://github.com/pallets/jinja/security/advisories/GHSA-gmj6-6f8f-6699) - [https://nvd.nist.gov/vuln/detail/CVE-2024-56201](https://nvd.nist.gov/vuln/detail/CVE-2024-56201) - [https://github.com/pallets/jinja/issues/1792](https://github.com/pallets/jinja/issues/1792) - [https://github.com/pallets/jinja/commit/767b23617628419ae3709ccfb02f9602ae9fe51f](https://github.com/pallets/jinja/commit/767b23617628419ae3709ccfb02f9602ae9fe51f) - [https://github.com/pallets/jinja](https://github.com/pallets/jinja) - [https://github.com/pallets/jinja/releases/tag/3.1.5](https://github.com/pallets/jinja/releases/tag/3.1.5) This data is provided by [OSV](https://osv.dev/vulnerability/GHSA-gmj6-6f8f-6699) and the [GitHub Advisory Database](https://github.com/github/advisory-database) ([CC-BY 4.0](https://github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Jinja has a sandbox breakout through indirect reference to format method [CVE-2024-56326](https://nvd.nist.gov/vuln/detail/CVE-2024-56326) / [GHSA-q2x7-8rv6-6q7h](https://github.com/advisories/GHSA-q2x7-8rv6-6q7h) <details> <summary>More information</summary> #### Details An oversight in how the Jinja sandboxed environment detects calls to `str.format` allows an attacker that controls the content of a template to execute arbitrary Python code. To exploit the vulnerability, an attacker needs to control the content of a template. Whether that is the case depends on the type of application using Jinja. This vulnerability impacts users of applications which execute untrusted templates. Jinja's sandbox does catch calls to `str.format` and ensures they don't escape the sandbox. However, it's possible to store a reference to a malicious string's `format` method, then pass that to a filter that calls it. No such filters are built-in to Jinja, but could be present through custom filters in an application. After the fix, such indirect calls are also handled by the sandbox. #### Severity - CVSS Score: 5.4 / 10 (Medium) - Vector String: `CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N` #### References - [https://github.com/pallets/jinja/security/advisories/GHSA-q2x7-8rv6-6q7h](https://github.com/pallets/jinja/security/advisories/GHSA-q2x7-8rv6-6q7h) - [https://nvd.nist.gov/vuln/detail/CVE-2024-56326](https://nvd.nist.gov/vuln/detail/CVE-2024-56326) - [https://github.com/pallets/jinja/commit/48b0687e05a5466a91cd5812d604fa37ad0943b4](https://github.com/pallets/jinja/commit/48b0687e05a5466a91cd5812d604fa37ad0943b4) - [https://github.com/pallets/jinja](https://github.com/pallets/jinja) - [https://github.com/pallets/jinja/releases/tag/3.1.5](https://github.com/pallets/jinja/releases/tag/3.1.5) - [https://lists.debian.org/debian-lts-announce/2025/04/msg00022.html](https://lists.debian.org/debian-lts-announce/2025/04/msg00022.html) This data is provided by [OSV](https://osv.dev/vulnerability/GHSA-q2x7-8rv6-6q7h) and the [GitHub Advisory Database](https://github.com/github/advisory-database) ([CC-BY 4.0](https://github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Jinja2 vulnerable to sandbox breakout through attr filter selecting format method [CVE-2025-27516](https://nvd.nist.gov/vuln/detail/CVE-2025-27516) / [GHSA-cpwx-vrp4-4pq7](https://github.com/advisories/GHSA-cpwx-vrp4-4pq7) <details> <summary>More information</summary> #### Details An oversight in how the Jinja sandboxed environment interacts with the `|attr` filter allows an attacker that controls the content of a template to execute arbitrary Python code. To exploit the vulnerability, an attacker needs to control the content of a template. Whether that is the case depends on the type of application using Jinja. This vulnerability impacts users of applications which execute untrusted templates. Jinja's sandbox does catch calls to `str.format` and ensures they don't escape the sandbox. However, it's possible to use the `|attr` filter to get a reference to a string's plain format method, bypassing the sandbox. After the fix, the `|attr` filter no longer bypasses the environment's attribute lookup. #### Severity - CVSS Score: 5.4 / 10 (Medium) - Vector String: `CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N` #### References - [https://github.com/pallets/jinja/security/advisories/GHSA-cpwx-vrp4-4pq7](https://github.com/pallets/jinja/security/advisories/GHSA-cpwx-vrp4-4pq7) - [https://nvd.nist.gov/vuln/detail/CVE-2025-27516](https://nvd.nist.gov/vuln/detail/CVE-2025-27516) - [https://github.com/pallets/jinja/commit/90457bbf33b8662926ae65cdde4c4c32e756e403](https://github.com/pallets/jinja/commit/90457bbf33b8662926ae65cdde4c4c32e756e403) - [https://github.com/pallets/jinja](https://github.com/pallets/jinja) - [https://lists.debian.org/debian-lts-announce/2025/04/msg00022.html](https://lists.debian.org/debian-lts-announce/2025/04/msg00022.html) - [https://lists.debian.org/debian-lts-announce/2025/04/msg00045.html](https://lists.debian.org/debian-lts-announce/2025/04/msg00045.html) This data is provided by [OSV](https://osv.dev/vulnerability/GHSA-cpwx-vrp4-4pq7) and the [GitHub Advisory Database](https://github.com/github/advisory-database) ([CC-BY 4.0](https://github.com/github/advisory-database/blob/main/LICENSE.md)). </details> > :exclamation: **Important** > > Release Notes retrieval for this PR were skipped because no github.com credentials were available. > If you are self-hosted, please see [this instruction](https://github.com/renovatebot/renovate/blob/master/docs/usage/examples/self-hosting.md#githubcom-token-for-release-notes). --- ### Configuration 📅 **Schedule**: (in timezone Europe/Madrid) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **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://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMjAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIyMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==-->
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
christof/codeberg-migrate!3
No description provided.