Moderate: python-jinja2 security update

python3-jinja2 Updated 02 Oct 2025

Summary

30/04/2024
N/A
Yes i
Unrated
Not published

ALSA-2024:2348: Moderate: python-jinja2 security update. Affects python3-jinja2 versions < 2.11.3-5.el9. Fixed in 2.11.3-5.el9. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The python-jinja2 package contains Jinja2, a template engine written in pure Python. Jinja2 provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment.

Vulnerability Detail

The vulnerability (CVE-2024-22195) in python-jinja2 allows HTML attribute injection when passing user input as keys to the xmlattr filter. This can lead to potential security issues, such as cross-site scripting (XSS) attacks, where an attacker can inject malicious code into the HTML output.

How To Fix

Minimum fixed version

2.11.3-5.el9

This is the first release that contains the fix.

sudo dnf update python3-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. Updating the python-jinja2 package to the latest version is the recommended solution.

Conclusion

In conclusion, the python-jinja2 package is vulnerable to HTML attribute injection when passing user input as keys to the xmlattr filter. To mitigate this vulnerability, it is crucial to update the package to version 2.11.3-5.el9 or later. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for python3-jinja2 →

Share this vulnerability

FAQ

Python-jinja2 is a template engine written in pure Python, providing a non-XML syntax inspired by Django.

The vulnerability allows HTML attribute injection, which can lead to potential security issues like cross-site scripting (XSS) attacks.

To fix this vulnerability, update the python-jinja2 package to version 2.11.3-5.el9 or later.

There is no specific workaround mentioned for this vulnerability. Updating the python-jinja2 package is the recommended solution.

You can find more information about this vulnerability in the CVE page(s) listed in the References section.

Related vulnerabilities

Recent vulnerabilities recorded for python3-jinja2.

How To Fix

Minimum fixed version

2.11.3-5.el9

This is the first release that contains the fix.

sudo dnf update python3-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