Expression Language Injection Affecting org.thymeleaf:thymeleaf-spring5 package, versions [,3.1.5.RELEASE)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.08% (24th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGTHYMELEAF-16419368
  • published5 May 2026
  • disclosed4 May 2026
  • creditCristian-Alexandru STAICU

Introduced: 4 May 2026

NewCVE-2026-41901  (opens in a new tab)
CWE-1336  (opens in a new tab)
CWE-917  (opens in a new tab)

How to fix?

Upgrade org.thymeleaf:thymeleaf-spring5 to version 3.1.5.RELEASE or higher.

Overview

Affected versions of this package are vulnerable to Expression Language Injection when dynamically loading classes, which allows server-side template injection that crosses the intended sandbox boundary. An attacker can execute unauthorized expressions with the privileges of the server by injecting malicious input into unsanitized variables used in sandboxed template contexts. This bypasses the isTypeForbidden() check to access StandardTypeLocator directly.

CVSS Base Scores

version 4.0
version 3.1