Critical Security Vulnerability in python-jinja2: Jinja Sandbox Breakout

python-jinja2 Updated 02 Oct 2025

Summary

29/07/2025
N/A
Yes i
High
7.3

RLSA-2025:3388: Important: python-jinja2 security update. Affects python-jinja2 versions < 0:2.10.1-7.el8_10. Fixed in 0:2.10.1-7.el8_10. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

python-jinja2 is a popular templating engine for Python, widely used for rendering dynamic web pages. It allows developers to create templates that can be populated with data, making it essential for web applications. The package supports features like template inheritance, macros, and automatic escaping, enhancing both functionality and security. However, it is susceptible to vulnerabilities that can compromise the integrity of applications using it.

Vulnerability Detail

The vulnerability identified as CVE-2025-27516 involves a sandbox breakout in Jinja, specifically through the 'attr' filter selecting the 'format' method. This flaw allows an attacker to execute arbitrary code outside the intended sandbox environment, potentially leading to unauthorized access and manipulation of sensitive data. The CVSS score for this vulnerability is 7.3, indicating a high severity level that necessitates immediate attention.

How To Fix

Minimum fixed version

0:2.10.1-7.el8_10

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

As a temporary measure, you can limit the use of the 'attr' filter in your templates until the package is updated. This can help mitigate the risk of exploitation while you prepare for the update.

Conclusion

The python-jinja2 package has a critical vulnerability (CVE-2025-27516) that allows for sandbox breakout, posing significant risks to applications. It is crucial to update to the patched version to mitigate these risks. Utilizing tools like Vulert can further enhance your security posture by monitoring for vulnerabilities in real-time.

See every vulnerability recorded for python-jinja2 →

Share this vulnerability

FAQ

CVE-2025-27516 is a security vulnerability in the python-jinja2 package that allows for sandbox breakout through the 'attr' filter, enabling potential code execution outside the intended environment.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Failing to address this vulnerability could lead to unauthorized access to sensitive data, code execution, and potential compromise of your application and its users.

Yes, a patch is available in version 0:2.10.1-7.el8_10 of the python-jinja2 package. Updating to this version will resolve the vulnerability.

Vulert is a tool that monitors and alerts for open-source vulnerabilities in software using just a manifest file like package-lock.json. It helps developers stay informed about vulnerabilities in their applications.

Related vulnerabilities

Recent vulnerabilities recorded for python-jinja2.

How To Fix

Minimum fixed version

0:2.10.1-7.el8_10

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