Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 6, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
jinja2 (changelog) ==3.1.5 -> ==3.1.6 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2025-27516

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.


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: Unknown
  • 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).


Release Notes

pallets/jinja (jinja2)

v3.1.6

Compare Source

This is the Jinja 3.1.6 security release, which fixes security issues but does not otherwise change behavior and should not result in breaking changes compared to the latest feature release.

PyPI: https://pypi.org/project/Jinja2/3.1.6/
Changes: https://jinja.palletsprojects.com/en/stable/changes/#version-3-1-6

  • The |attr filter does not bypass the environment's attribute lookup, allowing the sandbox to apply its checks. GHSA-cpwx-vrp4-4pq7

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

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

Rebasing: Whenever PR is behind base branch, 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 was generated by Mend Renovate. View the repository job log.

@openshift-ci
Copy link

openshift-ci bot commented Mar 6, 2025

Hi @renovate[bot]. Thanks for your PR.

I'm waiting for a redhat-developer member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2025

@renovate renovate bot force-pushed the renovate/python-pypi-jinja2-vulnerability branch from a80576a to e5b0e9a Compare March 6, 2025 08:23
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2025

@renovate renovate bot force-pushed the renovate/python-pypi-jinja2-vulnerability branch from e5b0e9a to 69078af Compare March 6, 2025 10:02
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2025

@renovate renovate bot force-pushed the renovate/python-pypi-jinja2-vulnerability branch from 69078af to fbf15c5 Compare March 6, 2025 11:46
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2025

@renovate renovate bot force-pushed the renovate/python-pypi-jinja2-vulnerability branch from fbf15c5 to 1c07cb4 Compare March 6, 2025 13:23
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2025

@renovate renovate bot force-pushed the renovate/python-pypi-jinja2-vulnerability branch from 1c07cb4 to 616379a Compare March 6, 2025 15:28
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2025

@renovate renovate bot force-pushed the renovate/python-pypi-jinja2-vulnerability branch from 616379a to 4f64aa2 Compare March 6, 2025 16:47
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2025

@renovate renovate bot force-pushed the renovate/python-pypi-jinja2-vulnerability branch from 4f64aa2 to c347a13 Compare March 6, 2025 18:07
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2025

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot force-pushed the renovate/python-pypi-jinja2-vulnerability branch from c347a13 to 0e6ef57 Compare March 6, 2025 18:53
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2025

@kim-tsao
Copy link
Member

kim-tsao commented Mar 7, 2025

/ok-to-test

@kim-tsao
Copy link
Member

kim-tsao commented Mar 7, 2025

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm label Mar 7, 2025
@openshift-ci
Copy link

openshift-ci bot commented Mar 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kim-tsao

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Mar 7, 2025
@kim-tsao
Copy link
Member

kim-tsao commented Mar 7, 2025

verified there are no errors when running pip-compile

@kim-tsao
Copy link
Member

kim-tsao commented Mar 7, 2025

/cherrypick release-1.5
/cherrypick release-1.4
/cherrypick release-1.3

@openshift-cherrypick-robot
Copy link
Contributor

@kim-tsao: once the present PR merges, I will cherry-pick it on top of release-1.3, release-1.4, release-1.5 in new PRs and assign them to you.

Details

In response to this:

/cherrypick release-1.5
/cherrypick release-1.4
/cherrypick release-1.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit aa1499a into main Mar 7, 2025
18 checks passed
@openshift-merge-bot openshift-merge-bot bot deleted the renovate/python-pypi-jinja2-vulnerability branch March 7, 2025 16:06
@openshift-cherrypick-robot
Copy link
Contributor

@kim-tsao: new pull request created: #2529

Details

In response to this:

/cherrypick release-1.5
/cherrypick release-1.4
/cherrypick release-1.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-cherrypick-robot
Copy link
Contributor

@kim-tsao: new pull request created: #2530

Details

In response to this:

/cherrypick release-1.5
/cherrypick release-1.4
/cherrypick release-1.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-cherrypick-robot
Copy link
Contributor

@kim-tsao: new pull request created: #2531

Details

In response to this:

/cherrypick release-1.5
/cherrypick release-1.4
/cherrypick release-1.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

chadcrum pushed a commit to chadcrum/rhdh that referenced this pull request Aug 3, 2025
…veloper#2518)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants