100DaysOfCode
100DaysOfCode copied to clipboard
CVE-2024-56326 (Medium) detected in Jinja2-2.11.2-py2.py3-none-any.whl
CVE-2024-56326 - Medium Severity Vulnerability
Vulnerable Library - Jinja2-2.11.2-py2.py3-none-any.whl
A very fast and expressive template engine.
Library home page: https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl
Path to dependency file: /day70/requirements.txt
Path to vulnerable library: /day70/requirements.txt,/day70/requirements.txt
Dependency Hierarchy:
- :x: Jinja2-2.11.2-py2.py3-none-any.whl (Vulnerable Library)
Found in HEAD commit: c88b9429eb68a85b22f0e39cac7bf20b89cb6709
Found in base branch: master
Vulnerability Details
Jinja is an extensible templating engine. Prior to 3.1.5, 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. This vulnerability is fixed in 3.1.5. Mend score differs from Mitre (CISA-ADP) because it considers factors such as required user interaction, local access constraints, and limited privilege requirements, which collectively lower the vulnerability score.
Publish Date: 2024-12-23
URL: CVE-2024-56326
CVSS 3 Score Details (6.7)
Base Score Metrics:
- Exploitability Metrics:
- Attack Vector: Local
- Attack Complexity: High
- Privileges Required: Low
- User Interaction: Required
- Scope: Unchanged
- Impact Metrics:
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Suggested Fix
Type: Upgrade version
Origin: https://github.com/pallets/jinja/security/advisories/GHSA-q2x7-8rv6-6q7h
Release Date: 2024-12-23
Fix Resolution: 3.1.5
Step up your Open Source Security Game with Mend here