Spring Security Advisories

CVE-2018-1271: Directory Traversal with Spring MVC on Windows

HIGH | APRIL 05, 2018 | CVE-2018-1271


Spring Framework versions 5.0 to 5.0.4, 4.3 to 4.3.14, and older unsupported versions allow applications to configure Spring MVC to serve static resources (e.g. CSS, JS, images). When static resources are served from a file system on Windows (as opposed to the classpath, or the ServletContext), a malicious user can send a request using a specially crafted URL that can lead a directory traversal attack.

Affected Spring Products and Versions

  • Spring Framework 5.0 to 5.0.4
  • Spring Framework 4.3 to 4.3.14
  • Older unsupported versions are also affected


Users of affected versions should apply the following mitigation:

  • 5.0.x users should upgrade to 5.0.5
  • 4.3.x users should upgrade to 4.3.15
  • Older versions should upgrade to a supported branch

There are no other mitigation steps necessary.

Note also that this attack does not apply to applications that:

  • Do not use Windows.
  • Do not serve files from the file system, i.e. not using “file:” for the resource location.
  • Use Spring Security with versions patched for CVE-2018-1199.


This issue was identified and responsibly reported by Orange Tsai (@orange_8361) from DEVCORE.



  • 2018-04-05: Initial vulnerability report published
  • 2018-04-13: Removed “Use of Tomcat or WildFly” from the list of not affected

Get ahead

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

Learn more

Get support

Spring Runtime 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