Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency jinja2 to v3.1.5 [security] #1575

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate-bot
Copy link
Contributor

This PR contains the following updates:

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

Warning

Some dependencies could not be looked up. Check the warning logs for more information.

GitHub Vulnerability Alerts

CVE-2024-56326

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.

CVE-2024-56201

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.


Release Notes

pallets/jinja (jinja2)

v3.1.5

Compare Source

Unreleased

  • Calling sync render for an async template uses asyncio.run.
    :pr:1952
  • Avoid unclosed auto_aiter warnings. :pr:1960
  • Return an aclose-able AsyncGenerator from
    Template.generate_async. :pr:1960
  • Avoid leaving root_render_func() unclosed in
    Template.generate_async. :pr:1960
  • Avoid leaving async generators unclosed in blocks, includes and extends.
    :pr:1960

Configuration

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

🚦 Automerge: Enabled.

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.

@renovate-bot renovate-bot requested a review from a team as a code owner December 24, 2024 01:09
Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi team,

I'm currently reviewing this pull request and will have a full review ready in a few minutes. In the meantime, here's a quick summary to get everyone up to speed:

This pull request, submitted by Renovate Bot, updates the jinja2 dependency from version 3.1.4 to 3.1.5. This is a security update addressing two vulnerabilities:

  • CVE-2024-56326: An oversight in the Jinja sandboxed environment allowed potential execution of arbitrary Python code if an attacker controlled template content.
  • CVE-2024-56201: A compiler bug allowed arbitrary code execution if an attacker controlled both template content and filename, regardless of sandbox usage.

The update affects the pyproject.toml file in the gemini/sample-apps/llamaindex-rag directory, specifically line 104, changing the jinja2 version specification.

The changes are straightforward and directly address critical security concerns. The Renovate bot has automatically identified and proposed this update, which is a good practice for keeping our dependencies secure.

Here's a little something to lighten the mood:

A bug is found,
A fix is made, a test is run,
The code compiles.

Thanks,
Gemini

Copy link
Contributor

Gemini encountered an error creating the review. You can try again by commenting @code-review-assist review.

@renovate-bot renovate-bot force-pushed the renovate/pypi-jinja2-vulnerability branch from da300b2 to dddec00 Compare December 24, 2024 08:38
@renovate-bot renovate-bot force-pushed the renovate/pypi-jinja2-vulnerability branch from dddec00 to 7f449df Compare December 25, 2024 15:00
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