CVE-2018-13864: Directory Traversal Vulnerability in Play Framework's Assets Controller
Summary
CVE-2018-13864: Play Framework's Assets controller vulnerable to directory traversal. Affects com.typesafe.play:play_2.12 versions >= 2.6.12, < 2.6.16. Fixed in 2.6.16. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
Play Framework is a popular web application framework written in Scala and Java. It provides a set of tools and libraries for building scalable and efficient web applications. The Assets controller in Play Framework allows developers to serve static assets such as CSS, JavaScript, and images. However, versions 2.6.12 through 2.6.15 of Play Framework are vulnerable to a directory traversal attack when running on Windows. This vulnerability can be exploited by a remote attacker to download arbitrary files from the target server by sending specially crafted HTTP requests.
Vulnerability Detail
The directory traversal vulnerability in Play Framework's Assets controller allows an attacker to bypass the intended restrictions and access files outside of the designated asset directory. By manipulating the HTTP requests, an attacker can traverse directories and download sensitive files from the server. This can lead to unauthorized access to confidential information, such as configuration files, database credentials, or source code. The vulnerability has a CVSS score of 7.5, indicating a high severity level.
How To Fix
Latest published version: 2.8.22 as of 23 Oct 2026
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.6.16
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading to the latest version is not immediately feasible, a temporary workaround is to implement additional server-side validation to prevent directory traversal attacks. This can be done by checking the requested file paths against a whitelist of allowed directories or by using a secure file serving library that handles file access securely. Here is an example of server-side validation using a whitelist in Java:
public Result serveFile(String filePath) {
List<String> allowedDirectories = Arrays.asList("/assets/");
if (allowedDirectories.stream().anyMatch(filePath::startsWith)) {
// Serve the file
} else {
// Return an error response
}
}
Conclusion
The directory traversal vulnerability in Play Framework's Assets controller can lead to unauthorized access to sensitive files on the server. It is crucial to upgrade to the latest version of Play Framework (2.6.16 or later) to fix this vulnerability. In the meantime, implementing server-side validation can provide temporary protection. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for com.typesafe.play:play_2.12 →
FAQ
The vulnerability allows an attacker to download arbitrary files from the target server, potentially exposing sensitive information and compromising the security of the application.
Versions 2.6.12 through 2.6.15 of Play Framework are affected by this vulnerability. It has been fixed in version 2.6.16.
Yes, this vulnerability can be exploited remotely by sending specially crafted HTTP requests to the vulnerable server.
Yes, the CVSS score for this vulnerability is 7.5, indicating a high severity level.
The recommended mitigation is to upgrade to Play Framework version 2.6.16 or later. Implementing additional server-side validation can also help mitigate the risk until the upgrade is performed.
Related vulnerabilities
Recent vulnerabilities recorded for com.typesafe.play:play_2.12.