External risk intelligence

Thymeleaf Restricted Expression Mode Bypass Vulnerability

CVE advisorySeverity: CRITICAL (CVSS 9.5)

CVE-2026-136410

Thymeleaf is a widely used Java template engine commonly integrated into public-facing web applications to render dynamic content. Because template injection vulnerabilities in web frameworks are often reachable via user-controlled input on public web endpoints, this component is frequently exposed to the internet in common deployment patterns.

Halo Surface Signal: 4 out of 5 — likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A critical vulnerability in the Thymeleaf template engine, specifically before version 3.1.6.RELEASE, allows unauthenticated remote attackers to execute forbidden actions by bypassing restricted expression modes. This could enable attackers to escalate server-side template injection through various input contexts within the application.

  • It bypasses security in web application templates.
  • Leadership should recall it impacts widely used Java web apps.
  • Confirm if this common web tool is in use.

Attack Path

How an attacker could exploit the issue

Attackers can exploit a bypass vulnerability in Thymeleaf's restricted expression mode by injecting specially crafted input into specific template contexts, such as preprocessing directives, `th:utext` attributes, or `th:on*` handlers. This allows them to escalate server-side template injection, potentially leading to unauthorized actions.

  • Unauthenticated remote access required.
  • Injection into restricted template contexts.
  • Server-side template injection leading to forbidden actions.

Live Threat

Current exploitation, exposure, and threat context

A restricted expression mode bypass vulnerability in Thymeleaf could allow unauthenticated remote attackers to escalate server-side template injection by injecting input into specific contexts. This could affect system data or service behavior when supported by the advisory.

  • System data and service behavior at risk.
  • Injection via user-controlled input.
  • Unauthorized server-side actions may occur.

Operational Fix

Recommended remediation, mitigation, and detection steps

This vulnerability impacts applications using Thymeleaf, likely web applications where unauthenticated remote attackers could exploit a restricted expression mode bypass. The first practical step is to identify all deployments of Thymeleaf, confirm their exposure and criticality, locate the responsible application or platform owner, and then prioritize remediation based on risk.

  • Application owners should lead remediation efforts.
  • Verify Thymeleaf deployment reachability and criticality.
  • Plan coordinated updates during maintenance windows.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is Thymeleaf?

Thymeleaf is a popular Java-based template engine. Developers use it to create dynamic web pages by merging static HTML templates with data from the server. It is frequently embedded within enterprise web frameworks to process and render the interface users see in their browsers.

What does CWE-917 mean for CVE-2026-136410?

CWE-917 refers to Improper Neutralization of Special Elements used in an Expression Language. In this CVE, it means the software fails to correctly restrict what an attacker can do within a template. By bypassing these limits, an attacker can trick the engine into executing unauthorized server-side code that should have been blocked.

How can an attacker trigger this vulnerability?

An attacker triggers this by injecting malicious input into specific, sensitive areas of a template, such as preprocessing directives or specific attributes like th:utext. Note that standard, non-sensitive template rendering that does not involve these restricted expression contexts is not the primary path for this specific bypass.

Is my application at risk if it uses Thymeleaf?

According to Halo Surface Signal, Thymeleaf is often integrated into public-facing web applications. If your application processes untrusted user input within templates and is reachable from the internet, the risk is higher. You should assess whether your specific implementation uses the affected expression modes.

How do I respond to this vulnerability?

Your first step is to perform an inventory of all applications in your environment to identify where Thymeleaf is in use. Check your dependencies to see if they are using a version older than 3.1.6.RELEASE. Once identified, coordinate with the responsible application owners to plan and apply the update during your next maintenance cycle.

References