CVE REMEDIATION GUIDE
Review reviewCriticalFixed-version data available

CVE-2026-40477 remediation guide

thymeleaf thymeleaf, org.thymeleaf:thymeleaf-spring5, org.thymeleaf:thymeleaf-spring6

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 Se...

Open CVE record
Productthymeleaf thymeleaf, org.thymeleaf:thymeleaf-spring5, org.thymeleaf:thymeleaf-spring6
Affected versions>= < 3.1.4.RELEASE, < 3.1.4
Fixed versions3.1.4
Priority basisReview · CVSS 9 · EPSS 0.85%
01

Identify the affected asset

Confirm whether thymeleaf thymeleaf, org.thymeleaf:thymeleaf-spring5, org.thymeleaf:thymeleaf-spring6 is installed, record the deployed version and installation path, and identify exposed interfaces.

  • Record the product name, package or appliance identifier, and installed version.
  • Identify internet-facing, administrative, API, and internal access paths.
  • Preserve the pre-change configuration and relevant service logs.
02

Validate the affected-version match

Compare the deployed version with the affected range: >= < 3.1.4.RELEASE, < 3.1.4. Treat incomplete inventory results as unresolved.

03

Prioritize with independent signals

The CVSS severity warrants an early asset and exposure review. Combine this signal with asset criticality, exposure, compensating controls, and business impact.

04

Apply supported remediation

Follow the vendor advisory or supported update path. Current fixed-version status: 3.1.4. Preserve configuration and rollback material before change.

05

Verify the result

Confirm the resulting version, service health, authentication and access paths, monitoring coverage, and relevant security logs.

  • Confirm the expected version and package state.
  • Run a functional health check for critical service paths.
  • Review authentication, error, application, and security monitoring logs.
  • Reassess exposure if the supported fix cannot be applied.

Operational boundary

This page does not replace the vendor advisory, support contract, change-management process, or recovery plan. Do not infer that an asset is unaffected from an incomplete inventory query or a missing fixed-version field.