Vulnary
← back to the feed
Critical· 9official fix available

CVE-2026-40477

Thymeleaf, a Java template engine, has a critical flaw that lets attackers inject code into templates when user input is not validated. The bug allows remote attackers to read or modify data on the server. It was fixed in Thymeleaf 3.1.4.RELEASE.

publishedApr 17, 2026
last modifiedAug 4, 2026
sourcesNVD
severity · cvss
9
critical · how bad it is
exploitation · epss
<1%
55th percentile · chance of exploitation in 30 days
(ai-assisted) A model wrote this summary from the official data, so double-check it against the source before you act on it. Read the official advisory →
auto-deletes from the system
counting…on Sep 3, 2026

An official fix is available, so this entry is kept for 30 days and then removed automatically.

01

Who is affected

Java applications using Thymeleaf 3.1.3.RELEASE or earlier, especially those that pass unvalidated user input directly to the template engine.

02

Real-world impact

An attacker could run arbitrary code inside the template engine, potentially reading sensitive files, database contents, or executing commands on the server.

03

Why this severity

The CVSS score of 9 reflects that the vulnerability can be exploited over the network, requires no user interaction, and gives the attacker full control over the server once the template injection succeeds.

04

What to do about it

official fix available
recommended steps
  1. 01Upgrade Thymeleaf to version 3.1.4.RELEASE or later.

NVD-referenced vendor advisory

05

Timeline

  1. Apr 17, 2026 · Apr 17, 2026
    Published
    Disclosed and added to the National Vulnerability Database.
  2. Aug 4, 2026 · 14h ago
    Advisory updated
    The NVD record was last revised.
  3. Aug 4, 2026 · 12h ago
    Official fix available
    A vendor patch or mitigation now exists — see the remediation steps above.
06

How it’s attacked

Attack vectorNetwork (remote)
Attack complexityHigh
Privileges requiredNone
User interactionNone needed
ScopeChanged
Confidentiality impactHigh
Integrity impactHigh
Availability impactHigh
07

References & advisories

(ai-assisted) A model wrote this summary from the official data, so double-check it against the source before you act on it. Read the official advisory →
CVE-2026-40477: Thymeleaf, a Java template engine, has a critical flaw that lets attac · Vulnary