Skip to main content

Dify CVE-2026-18632

| EUVDEUVD-2026-52412 LOW
Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336)
2026-08-03 VulDB GHSA-9qv6-q72p-wgw8
2.1
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain low-privilege Dify credentials
  2. Delivery
    Access Jinja2 code executor interface
  3. Exploit
    Craft SSTI payload with template expression
  4. Execution
    Submit HTTP request to vulnerable endpoint
  5. Persist
    Server renders unsanitized template
  6. Impact
    Exfiltrate 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.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
No patch listed yet 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

dify 1.14.2
dify 1.14.0
dify 1.14.1

Affected Packages

euvd dify no fix

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

Vendor (VulDB) PRIMARY 2.1 MEDIUM
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
vuln.today AI 6.3 MEDIUM

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.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Severity Changed
Aug 03, 2026 - 20:22 NVD
MEDIUM LOW
CVSS changed
Aug 03, 2026 - 20:22 NVD
5.3 (MEDIUM) 2.1 (LOW)
CVE Published
Aug 03, 2026 - 19:30 cve.org
MEDIUM 5.3

DescriptionCVE.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

EPSS Score
0.4%
Top 70% exploitable
Prevalence
Medium
popular open-source LLM app platform, significant developer adoption
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.

SignalValue
Severity LOW
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available No
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Dify

View all
CVE-2025-63387 HIGH POC
7.5 Dec 18

Dify 1.9.1 permits unauthenticated remote GET requests to the /console/api/system-features console endpoint, letting ano

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

CVE-2026-41948 CRITICAL POC
9.3 May 18

Path traversal in Dify versions 0 through 1.14.1 allows authenticated tenants to escape their authorized tenant path and

CVE-2026-41947 CRITICAL POC
9.3 May 18

Cross-tenant authorization bypass in LangGenius Dify versions through 1.14.1 lets any logged-in editor reroute another t

CVE-2025-1796 HIGH POC
8.8 Mar 20

A vulnerability in langgenius/dify v0.10.1 allows an attacker to take over any account, including administrator accounts

CVE-2026-61461 HIGH POC
8.7 Jul 10

SQL injection in Dify's MyScale vector store backend (versions before 1.16.0-rc1) lets authenticated attackers execute a

CVE-2025-67732 HIGH POC
8.4 Jan 05

Plaintext exposure of third-party service API keys in Dify prior to version 1.11.0 allows any authenticated non-administ

CVE-2026-41949 HIGH POC
8.2 May 18

Cross-tenant document disclosure in Dify 1.14.1 and prior allows any authenticated user to read up to 3,000 characters o

CVE-2024-12039 HIGH POC
8.1 Mar 20

langgenius/dify version v0.10.1 contains a vulnerability where there are no limits applied to the number of code guess a

CVE-2024-12776 HIGH POC
8.1 Mar 20

In langgenius/dify v0.10.1, the `/forgot-password/resets` endpoint does not verify the password reset code, allowing an

CVE-2025-43862 HIGH POC
7.6 Apr 25

Dify is an open-source LLM app development platform. Rated high severity (CVSS 7.6), this vulnerability is remotely expl

CVE-2024-11824 HIGH POC
7.6 Mar 20

A stored cross-site scripting (XSS) vulnerability exists in langgenius/dify version latest, specifically in the chat log

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy