PyPi: Jinja2

CVE-2024-22195

Safety vulnerability ID: 64227

This vulnerability was reviewed by experts

The information on this page was manually curated by our Cybersecurity Intelligence Team.

Created at Jan 11, 2024 Updated at May 06, 2024
Scan your Python projects for vulnerabilities →

Advisory

Jinja2 before 3.1.3 is affected by a Cross-Site Scripting vulnerability. Special placeholders in the template allow writing code similar to Python syntax. It is possible to inject arbitrary HTML attributes into the rendered HTML template. The Jinja 'xmlattr' filter can be abused to inject arbitrary HTML attribute keys and values, bypassing the auto escaping mechanism and potentially leading to XSS. It may also be possible to bypass attribute validation checks if they are blacklist-based.

Affected package

jinja2

Latest version: 3.1.4

A very fast and expressive template engine.

Affected versions

Fixed versions

Vulnerability changelog

Jinja is an extensible templating engine. Special placeholders in the template allow writing code similar to Python syntax. It is possible to inject arbitrary HTML attributes into the rendered HTML template, potentially leading to Cross-Site Scripting (XSS). The Jinja `xmlattr` filter can be abused to inject arbitrary HTML attribute keys and values, bypassing the auto escaping mechanism and potentially leading to XSS. It may also be possible to bypass attribute validation checks if they are blacklist-based. See CVE-2024-22195.


MISC:https://github.com/pallets/jinja/releases/tag/3.1.3: https://github.com/pallets/jinja/releases/tag/3.1.3
MISC:https://github.com/pallets/jinja/security/advisories/GHSA-h5c8-rqwp-cp95: https://github.com/pallets/jinja/security/advisories/GHSA-h5c8-rqwp-cp95

Resources

Use this package?

Scan your Python project for dependency vulnerabilities in two minutes

Scan your application

Severity Details

CVSS Base Score

MEDIUM 6.1

CVSS v3 Details

MEDIUM 6.1
Attack Vector (AV)
NETWORK
Attack Complexity (AC)
LOW
Privileges Required (PR)
NONE
User Interaction (UI)
REQUIRED
Scope (S)
CHANGED
Confidentiality Impact (C)
LOW
Integrity Impact (I)
LOW
Availability Availability (A)
NONE