Jinja <3.1.5 security vulnerability

Open
#225 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
security, tooling

Research direction

Start with the repository's dependency configuration and CI setup; the issue links to Dependabot alert 12 and requests a Jinja update plus dependency security scanning. Confirm the vulnerability is addressed and that scanning is enabled and detects future dependency issues.

Written by the indexing model from the issue text.

Description

dependencies good first issue

https://github.com/DiamondLightSource/blueapi/security/dependabot/12


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.```

Python-copier-template should update the version of Jinja, even if it appears to not be directly relevant. 
Python-copier-template should also enable security scanning of dependencies, so that issues are caught ASAP and handled in the appropriate place
Dominant language
Jinja
Stars
28
Forks
10
Avg merge
3d 4h
Merged PRs (30d)
4

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DiamondLightSource/python-copier-template

All issues in DiamondLightSource/python-copier-template

Similar issues

More Security issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.