CVE-2026-40477: Thymeleaf - Server-Side Template Injection
- Cve: CVE-2026-40477
- Name: Thymeleaf - Server-Side Template Injection
- Description: Thymeleaf is a server-side Java template engine for web and standalone environments. Versions 3.1.3.RELEASE and prior contain a security bypass vulnerability in the expression execution mechanisms. Although the library provides mechanisms to prevent expression injection, it fails to properly restrict the scope of accessible objects, allowing specific potentially sensitive objects to be reached from within a template. If an application developer passes unvalidated user input directly to the template engine, an unauthenticated remote attacker can bypass the library's protections to achieve Server-Side Template Injection (SSTI). This issue has ben fixed in version 3.1.4.RELEASE.
- Impact: Unauthenticated remote attackers can execute arbitrary server-side template code, potentially leading to full server compromise.
- Remediation: Upgrade to version 3.1.4.RELEASE or later.
- Vulnerability type: server_side_request_forgery
- Vulnerability impact: remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9
- Cvss vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
- Epss score: 0.00866
- Epss percentile: 0.5959
- Assignee: [email protected]
- Published at: 2026-04-17T22:16:33Z
- Age in days: 221
- Modified at: 2026-10-26T22:10:00Z
- Patch available: yes
- Public exploits total: 1
- References total: 6
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-40477
- Nvd status: modified
- Checked, none or zero: nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-917 | Improper Neutralization of Special Elements used in an Expression Language Statement |
Known exploited entries
| List | Added date | Due date | Ransomware use |
|---|---|---|---|
| vulncheck | 2026-10-10 | — | no |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/xiaoqiMikko/thymeleaf-check | poc-in-github | 2026-09-04 |
References
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| thymeleaf:thymeleaf | < 3.1.4 | no | nvd | /v1/products/thymeleaf/thymeleaf |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| thymeleaf/thymeleaf | package, security_advisory | yes | /v1/repositories/thymeleaf/thymeleaf |
Index
- Repositories: 44
- Repositories high signal: 24
- Packages: 3
Exploitation
- Known exploited by: vulncheck
- Vulncheck known exploited since: 2026-10-10
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2026-09-04
- Remote: yes
- Checked, none or zero: known exploited, exploitation seen, initial access, authentication required
- Not known: known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts