100DaysOfCode icon indicating copy to clipboard operation
100DaysOfCode copied to clipboard

CVE-2025-27516 (High) detected in Jinja2-2.11.2-py2.py3-none-any.whl

Open mend-bolt-for-github[bot] opened this issue 8 months ago • 0 comments

CVE-2025-27516 - High 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.6, 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. This vulnerability is fixed in 3.1.6.

Publish Date: 2025-03-05

URL: CVE-2025-27516

CVSS 3 Score Details (7.3)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Local
    • Attack Complexity: Low
    • Privileges Required: Low
    • User Interaction: Required
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: High
    • Availability Impact: High
For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Release Date: 2025-03-05

Fix Resolution: 3.1.6


Step up your Open Source Security Game with Mend here