CVE-2026-18632 Details
Description
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.
A server-side template injection vulnerability has been identified in Langgenius Dify versions through 1.14.2. The issue arises in the Jinja2 Handler component, specifically within the code execution function that improperly uses the unrestricted 'jinja2.Template()' constructor. This flaw allows remote attackers to escape the template sandbox and execute arbitrary code by exploiting Python's object introspection capabilities. The vulnerability exists in the default configuration, and the vendor has not responded to prior disclosure attempts.
To address this vulnerability, replace 'jinja2.Template()' with 'SandboxedEnvironment()' to create a stricter sandbox that blocks dangerous attributes. Additionally, add input validation to reject templates containing hazardous patterns before rendering. It is also recommended to fix the application's unrestricted network access, which could allow data exfiltration.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Aug 3, 2026CISA-ADP
Assessed Aug 3, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/CVE-Hunter-Leo/CVE/issues/14 | [email protected] | ExploitIssue TrackingRemedy |
| https://vuldb.com/cve/CVE-2026-18632 | [email protected] | AdvisoryPermission Required |
| https://vuldb.com/submit/853188 | [email protected] | Issue TrackingPermission Required |
| https://vuldb.com/vuln/385555 | [email protected] | AdvisoryPermission Required |
| https://vuldb.com/vuln/385555/cti | [email protected] | Content Wall |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1336 | Improper Neutralization of Special Elements Used in a Template Engine | [email protected] |
| CWE-791 | Incomplete Filtering of Special Elements | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| langgenius Dify | <= 1.14.2 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 23, 2026 | CVE Translated | [email protected] |
| Aug 3, 2026 | CVE Modified | CISA-ADP |
| Aug 3, 2026 | New CVE Received | [email protected] |
Volerion