Moderate: python-jinja2 security update

python-jinja2 Updated 02 Oct 2025

Summary

14/06/2024
N/A
Yes i
Unrated
Not published

RLSA-2024:3102: Moderate: python-jinja2 security update. Affects python-jinja2 versions < 0:2.10.1-4.el8. Fixed in 0:2.10.1-4.el8. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The python-jinja2 package is a template engine written in pure Python. It provides a Django-inspired non-XML syntax and supports inline expressions and a sandboxed environment. The package is widely used in various applications and frameworks for rendering templates.

Vulnerability Detail

The vulnerability identified in python-jinja2 is related to HTML attribute injection when passing user input as keys to the xmlattr filter. This could allow an attacker to inject malicious code into HTML attributes, potentially leading to cross-site scripting (XSS) attacks. The impact of this vulnerability depends on how the affected package is used within an application or framework.

How To Fix

Minimum fixed version

0:2.10.1-4.el8

This is the first release that contains the fix.

sudo dnf update python-jinja2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. However, as a general best practice, it is recommended to sanitize and validate user input before using it as keys to the xmlattr filter in Jinja2 templates. This can help prevent the injection of malicious code into HTML attributes.

Conclusion

The python-jinja2 package is affected by a moderate security vulnerability related to HTML attribute injection. To mitigate this vulnerability, it is crucial to update the package to the recommended version. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for python-jinja2 →

Share this vulnerability

FAQ

Python-jinja2 is a template engine written in pure Python that provides a non-XML syntax for rendering templates. It is widely used in various applications and frameworks.

The vulnerability in python-jinja2 could allow an attacker to inject malicious code into HTML attributes, potentially leading to cross-site scripting (XSS) attacks. The impact depends on how the affected package is used within an application or framework.

To fix this vulnerability, it is recommended to update the python-jinja2 package to version 2.10.1-4.el8 or later. This update includes the necessary security patches to mitigate the HTML attribute injection issue.

There is no specific workaround mentioned for this vulnerability. However, it is recommended to sanitize and validate user input before using it as keys to the xmlattr filter in Jinja2 templates.

More information about this vulnerability, including the CVE identifier, can be found in the CVE page listed in the References section of the vulnerability details.

Related vulnerabilities

Recent vulnerabilities recorded for python-jinja2.

How To Fix

Minimum fixed version

0:2.10.1-4.el8

This is the first release that contains the fix.

sudo dnf update python-jinja2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback