CVE-2026-71463
Jinja template AST whitelist bypass leads to traceback leak via webhook.
- CVSS 2.7
- CWE-209
- Information Leakage
- Remote
Notification template Jinja AST whitelist only inspects static Getattr nodes. Dynamic subscripts (job['job'+'_env']) and {% if job.id > 100 %} conditional gating bypass both the AST check and the test-render (stub has small job.id). At runtime, the gated branch executes and exceptions write full tracebacks into notification body, which is POSTed to attacker-controlled webhook URL. Leaks install paths, Python version, source line numbers.
- CWE
- CWE-209
- CVSS base score
- 2.7
- Published
- 2026-09-23
- OWASP
- A03 Injection
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Information Leakage
- Subcategory
- Information Disclosure
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Affected component
- Jinja
- Fixed by upgrading
- Yes
Solution
Upgrade Jinja2 to 3.1.3 (or newer), which fixes the AST whitelist bypass and prevents traceback leakage.
Vulnerable code sample
import jinja2
import requests
def send_notification(job, webhook_url):
# VULNERABLE: dynamic subscript and conditional allow traceback leakage
tmpl = jinja2.Environment().from_string(
"{{ job['job' + '_env'] }}{% if job.id > 100 %} secret {% endif %}"
)
body = tmpl.render(job=job)
requests.post(webhook_url, json={"text": body})Patched code sample
import jinja2
import requests
def send_notification(job, webhook_url):
# FIX: use static keys and remove unsafe conditional
tmpl = jinja2.Environment().from_string(
"{{ job_env }}"
)
safe_context = {"job_env": job.get("job_env", "")}
body = tmpl.render(**safe_context)
requests.post(webhook_url, json={"text": body})Cite this entry
@misc{vaitp:cve202671463,
title = {{Jinja template AST whitelist bypass leads to traceback leak via webhook.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-71463},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-71463/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
