CVE-2018-1271: Path Traversal in org.springframework:spring-core

Summary

17/10/2018
Yes i
Moderate
5.9

CVE-2018-1271: Path Traversal in org.springframework:spring-core. Affects org.springframework:spring-core across 2 version ranges.

< 4.3.15 >= 5.0.0, < 5.0.5

Fixed in 4.3.15 or 5.0.5, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The org.springframework:spring-core package is a core component of the Spring Framework, which is a popular Java-based framework used for building enterprise-level applications. It provides essential functionality and utilities for various Spring modules, including Spring MVC. Spring MVC allows applications to serve static resources such as CSS, JS, and images. These resources can be served from either the classpath, the ServletContext, or the file system on Windows. However, a vulnerability in versions 5.0 prior to 5.0.5 and versions 4.3 prior to 4.3.15 (and older unsupported versions) allows a malicious user to exploit a directory traversal attack when static resources are served from the file system on Windows.

Vulnerability Detail

The vulnerability arises from a lack of proper input validation and sanitization in the handling of user-supplied URLs. By crafting a specially crafted URL, an attacker can bypass the intended resource restrictions and access arbitrary files on the file system. This can lead to unauthorized disclosure of sensitive information, remote code execution, or other malicious activities. The vulnerability has a CVSS score of 5.9, indicating a moderate severity level.

How To Fix

Latest published version: 7.1.0-RC1 as of 22 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 4.3.15 4.3.15
  • >= 5.0.0, < 5.0.5 5.0.5

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading to a fixed version is not immediately feasible, a temporary workaround is to serve static resources from the classpath or the ServletContext instead of the file system on Windows. This can be achieved by configuring Spring MVC accordingly. Here is an example of how to configure Spring MVC to serve static resources from the classpath:

@Configuration
@EnableWebMvc
public class MvcConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry
            .addResourceHandler("/resources/**")
            .addResourceLocations("classpath:/static/");
    }

}

By using this workaround, the risk of a directory traversal attack can be mitigated.

Conclusion

In conclusion, the org.springframework:spring-core package is vulnerable to a path traversal attack when serving static resources from the file system on Windows. Upgrading to a fixed version of the Spring Framework is the recommended solution. In the meantime, serving static resources from the classpath or the ServletContext can serve as a temporary workaround. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.springframework:spring-core →

Share this vulnerability

FAQ

The vulnerability allows an attacker to perform directory traversal attacks, potentially leading to unauthorized access to sensitive files, remote code execution, or other malicious activities.

Versions 5.0 prior to 5.0.5 and versions 4.3 prior to 4.3.15 (and older unsupported versions) are affected by this vulnerability.

Yes, the CVSS score for this vulnerability is 5.9, indicating a moderate severity level.

To fix this vulnerability, it is recommended to upgrade to a fixed version of the Spring Framework. For versions 5.0, upgrade to version 5.0.5 or later. For versions 4.3, upgrade to version 4.3.15 or later.

Yes, a temporary workaround is to serve static resources from the classpath or the ServletContext instead of the file system on Windows. This can be achieved by configuring Spring MVC accordingly.

Related vulnerabilities

Recent vulnerabilities recorded for org.springframework:spring-core.

How To Fix

Latest published version: 7.1.0-RC1 as of 22 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 4.3.15 4.3.15
  • >= 5.0.0, < 5.0.5 5.0.5

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback