Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain low-privilege Dify credentials
-
DeliveryAccess Jinja2 code executor interface
-
ExploitCraft SSTI payload with template expression
-
ExecutionSubmit HTTP request to vulnerable endpoint
-
PersistServer renders unsanitized template
-
ImpactExfiltrate server-side data or escalate to code execution
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
|
| Exploitation Conditions | Exploitation requires a valid low-privilege Dify account - the CVSS 4.0 PR:L metric confirms unauthenticated exploitation is not possible; any authenticated user credential satisfies this requirement. The attacker must have access to the Jinja2 template submission interface within Dify's code executor subsystem (api/core/helper/code_executor/jinja2/jinja2_transformer.py). The attack is network-accessible (AV:N) with low complexity (AC:L) and requires no user interaction. Limiting factors include: authentication is mandatory (no anonymous exploitation), and CVSS 4.0 impact metrics (VC:L/VI:L/VA:L) suggest sandboxing may constrain impact to information disclosure rather than full RCE - however, this sandboxing has not been independently verified. The specific Dify role or permission tier required to invoke Jinja2 template rendering is not specified in available data and should be verified against Dify's access control model. |
| Impact | The CVSS 4.0 base score of 5.3 (Medium) reflects a PR:L (low-privilege authentication required) network-accessible SSTI with impact capped at Low across confidentiality, integrity, and availability (VC:L/VI:L/VA:L), with no subsequent-system impact (SC:N/SI:N/SA:N). This low-impact assessment is notable because Jinja2 SSTI vulnerabilities classically yield full remote code execution - the discrepancy suggests Dify may implement sandboxing on its Jinja2 execution environment, but this has not been confirmed by the vendor or any independent analysis. If that sandbox can be bypassed (a recurring finding in Jinja2 SSTI research), real-world impact would substantially exceed the scored metrics. The E:P modifier in the CVSS 4.0 vector confirms public proof-of-concept availability, elevating practical exploitation likelihood above what a 5.3 base score alone implies. No CISA KEV listing is present, indicating no confirmed mass exploitation at time of analysis, though the combination of network accessibility, low complexity, low privilege requirement, and a working POC represents a meaningful threat for organizations running exposed Dify instances. EPSS data was not provided; the absence of a vendor patch and lack of vendor engagement further increases organizational risk. |
| Exploit ScenarioDerived | An authenticated Dify user with a standard low-privilege account accesses the Jinja2 code execution interface and submits a crafted template payload - such as one traversing Python class hierarchies to read environment variables or invoke subprocess calls - which the server renders without sanitization, returning sensitive data or executing attacker-controlled code. A public proof-of-concept targeting this specific CVE is available on GitHub, meaning exploitation requires minimal adaptation from the published exploit code. The attack requires no user interaction and is executable remotely over the network. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 03, 2026
Server-side template injection (SSTI) in Dify's Jinja2 Handler (versions ≤1.14.2) allows remote, low-privileged authenticated attackers to inject malicious Jinja2 template expressions through the code execution subsystem, resulting in information disclosure and potential further impact. A public proof-of-concept exploit is available on GitHub, materially lowering the bar for exploitation. The vendor did not respond to responsible disclosure, meaning no patch has been released and no official mitigation guidance exists.
RemediationAI
No vendor-released patch has been identified at time of analysis; the vendor did not respond to responsible disclosure and no patched version has been confirmed. The most effective compensating control is to disable the Jinja2 code executor feature in Dify's configuration if it is not operationally required, eliminating the attack surface entirely. If the feature must remain enabled, restrict access to it to the minimum set of trusted users by tightening Dify role assignments, reducing the pool of accounts that can submit or modify Jinja2 templates. Deploying a WAF rule to detect common Jinja2 SSTI payloads (e.g., expressions containing double braces, __class__, __mro__, config, or cycler) can reduce automated exploitation, though signature-based rules carry bypass risk and should be treated as a secondary control. Organizations should monitor the VulDB advisory at https://vuldb.com/vuln/385555 and the POC reference at https://github.com/CVE-Hunter-Leo/CVE/issues/14 for any patch releases or updated guidance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine) describes server-side template injection, where user-controlled input is passed unsanitized into a Jinja2 Template() constructor or render call. The vulnerable component in Dify - an open-source LLM application development platform - is the Jinja2 transformer at api/core/helper/code_executor/jinja2/jinja2_transformer.py, which is responsible for rendering Jinja2 templates within the platform's code execution pipeline. In Python environments, Jinja2 SSTI is particularly severe because template context access can expose Python builtins, object class hierarchies, and, absent effective sandboxing, yield arbitrary code execution via __class__.__mro__ traversal. The CPE cpe:2.3:a:langgenius:dify:*:*:*:*:*:*:*:* confirms all Dify releases through version 1.14.2 are affected, spanning both self-hosted and container-based deployments.
Know when Dify gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
PR:L reflects mandatory authenticated access; S:U aligns with CVSS 4.0 SC:N/SI:N/SA:N (no scope change); C/I/A:L mirrors the 4.0 VC/VI/VA:L sandboxed-impact assessment.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
3DescriptionCVE.org
A security flaw has been discovered in langgenius dify up to 1.14.2. This issue affects the function jinja2.Template of the file api/core/helper/code_executor/jinja2/jinja2_transformer.py of the component Jinja2 Handler. The manipulation results in improper neutralization of special elements used in a template engine. The attack may be launched remotely. The exploit has been released to the public and may be used for attacks. The vendor was contacted early about this disclosure but did not respond in any way.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Dify 1.9.1 permits unauthenticated remote GET requests to the /console/api/system-features console endpoint, letting ano
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
Path traversal in Dify versions 0 through 1.14.1 allows authenticated tenants to escape their authorized tenant path and
Cross-tenant authorization bypass in LangGenius Dify versions through 1.14.1 lets any logged-in editor reroute another t
A vulnerability in langgenius/dify v0.10.1 allows an attacker to take over any account, including administrator accounts
SQL injection in Dify's MyScale vector store backend (versions before 1.16.0-rc1) lets authenticated attackers execute a
Plaintext exposure of third-party service API keys in Dify prior to version 1.11.0 allows any authenticated non-administ
Cross-tenant document disclosure in Dify 1.14.1 and prior allows any authenticated user to read up to 3,000 characters o
langgenius/dify version v0.10.1 contains a vulnerability where there are no limits applied to the number of code guess a
In langgenius/dify v0.10.1, the `/forgot-password/resets` endpoint does not verify the password reset code, allowing an
Dify is an open-source LLM app development platform. Rated high severity (CVSS 7.6), this vulnerability is remotely expl
A stored cross-site scripting (XSS) vulnerability exists in langgenius/dify version latest, specifically in the chat log
EUVD-2026-52412
GHSA-9qv6-q72p-wgw8
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB