Spring Framework Path Traversal via Backslash in SpringTemplateLoader

MEDIUM | AUGUST 20, 2026 | CVE-2026-59280

Description

Applications using Spring Framework's FreeMarker integration may be vulnerable to a path traversal attack when a controller returns a view name derived from untrusted input and FreeMarker is configured to resolve templates through SpringTemplateLoader. Under these conditions, a view name containing backslash sequences can escape the configured template directory, potentially exposing files that should not be accessible.

Returning a view name derived from untrusted input is an application-level anti-pattern that Spring documentation warns against; applications that do not do so are not affected.

Affected Spring Products and Versions

Spring Framework:

  • 7.0.0 - 7.0.8
  • 6.2.0 - 6.2.19
  • 6.1.0 - 6.1.28
  • 6.0.0 - 6.0.30
  • 5.3.0 - 5.3.49
  • 5.2.25 and earlier

Mitigation

Users of affected versions should upgrade to the corresponding fixed version.
Fix versionAvailability
7.0.9OSS
7.0.8.1Enterprise Support Only
6.2.20Enterprise Support Only
6.1.29Enterprise Support Only
6.0.31Enterprise Support Only
5.3.50Enterprise Support Only
5.2.26Enterprise Support Only

No further mitigation steps are necessary.

History

  • 2026-08-20: Initial vulnerability report published.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all