Remote Code Execution Vulnerability in Apache Commons FileUpload (libcommons-fileupload-java)

libcommons-fileupload-java Updated 02 Oct 2025

Summary

25/10/2016
N/A
No i
Unrated
Not published

DEBIAN-CVE-2016-1000031: Apache Commons FileUpload before 1.3.3 DiskFileItem File Manipulation Remote Code Execution. Affects libcommons-fileupload-java versions 1.4-1 – 1.5-1.1. No fix is published. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Apache Commons FileUpload is a popular library used in Java applications for handling file uploads. It provides a simple API for processing file uploads in web applications, allowing developers to easily manage file input from users. However, prior to version 1.3.3, the library contained a vulnerability that could allow attackers to manipulate file paths, leading to potential remote code execution.

Vulnerability Detail

The vulnerability, identified as CVE-2016-1000031, arises from improper handling of file paths in the DiskFileItem class of Apache Commons FileUpload versions prior to 1.3.3. This flaw allows an attacker to craft a malicious file upload request that could lead to arbitrary code execution on the server. The implications of this vulnerability are severe, as it could allow unauthorized access to sensitive data or complete control over the affected server.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, you can implement strict validation on file uploads, ensuring that only files with specific extensions are accepted and that the file paths are sanitized before processing. However, this is not a substitute for applying the patch.

Conclusion

The Apache Commons FileUpload library has a critical vulnerability that could lead to remote code execution. It is crucial for users of this library to update to the patched version to mitigate risks. Implementing workarounds can provide temporary relief, but updating the package is the best long-term solution.

See every vulnerability recorded for libcommons-fileupload-java →

Share this vulnerability

FAQ

CVE-2016-1000031 is a vulnerability in Apache Commons FileUpload that allows for remote code execution due to improper file path handling.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If exploited, this vulnerability can lead to unauthorized access to sensitive data and potentially full control over the affected server.

Yes, the patch is available in version 1.3.3 and later of the libcommons-fileupload-java package.

If immediate updates are not possible, implement strict validation and sanitization of file uploads as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for libcommons-fileupload-java.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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