CVE-2026-2969: Server-Side Template Injection in datapizza-ai Package via Jinja2 Template Handler
Summary
CVE-2026-2969: datapizza-ai: Server-Side Template Injection in ChatPromptTemplate via Jinja2 Template Handler. Affects datapizza-ai-core versions < 0.0.2. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
datapizza-ai is a Python package designed for AI-driven applications, providing tools for creating and managing chat prompts. It utilizes the Jinja2 template engine for rendering dynamic content. However, version 0.0.2 of the package contains a vulnerability that allows for server-side template injection, which can lead to unauthorized access and manipulation of server-side data.
Vulnerability Detail
A flaw in the ChatPromptTemplate function of the datapizza-ai package allows for improper neutralization of special elements used in the Jinja2 template engine. This vulnerability can be exploited remotely, enabling attackers to inject malicious templates that may compromise server integrity and expose sensitive data. The issue arises from the way user input is handled, leading to potential code execution or data leakage.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary measure, you can sanitize user inputs to prevent the injection of malicious templates. This can be done by implementing strict validation rules for the inputs passed to the ChatPromptTemplate function, ensuring that no special characters or template syntax are allowed.
Conclusion
The vulnerability identified as CVE-2026-2969 in the datapizza-ai package poses a significant risk due to server-side template injection. Users are advised to update their packages promptly and implement input validation as a temporary workaround. Utilizing tools like Vulert can help monitor for such vulnerabilities in real-time.
See every vulnerability recorded for datapizza-ai-core →
FAQ
The CVSS score of this vulnerability is 4.7, indicating a moderate level of severity.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
Exploitation of this vulnerability may lead to unauthorized access, data leakage, or even remote code execution on the server.
Yes, updating to a version higher than 0.0.2 of the datapizza-ai-core package will patch the vulnerability.
Server-side template injection is a type of vulnerability that allows an attacker to inject malicious templates into the server-side rendering process, potentially leading to code execution or data exposure.
Related vulnerabilities
Recent vulnerabilities recorded for datapizza-ai-core.