Critical Vulnerability in libcommons-fileupload-java: Remote File Write via NULL Byte Injection

libcommons-fileupload-java Updated 02 Oct 2025

Summary

28/10/2013
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2013-2186: The DiskFileItem class in Apache Commons FileUpload, as used in Red Hat JBoss BRMS 5.3.1; JBoss Portal 4.3 CP07, 5.2.2, and 6.0.0; and Red Hat JBoss Web Server 1.0.2 allows remote attackers to write to arbitrary files vi... Affects libcommons-fileupload-java versions < 1.3-2.1. Fixed in 1.3-2.1. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libcommons-fileupload-java is a Java library used for handling file uploads in web applications. It provides a simple API for uploading files and managing file data. However, this library has been found to be vulnerable to a critical issue that allows remote attackers to exploit the file upload functionality, potentially leading to unauthorized file writes on the server.

Vulnerability Detail

The vulnerability, identified as CVE-2013-2186, exists in the DiskFileItem class of Apache Commons FileUpload. It allows remote attackers to write to arbitrary files by exploiting a NULL byte in a file name within a serialized instance. This can lead to severe security implications, including unauthorized access to sensitive files and potential system compromise.

How To Fix

Minimum fixed version

1.3-2.1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libcommons-fileupload-java

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can implement input validation to sanitize file names before processing uploads. This can help mitigate the risk of NULL byte injection. Ensure that file names do not contain any unexpected characters or sequences.

Conclusion

The libcommons-fileupload-java package has a critical vulnerability that can be exploited by remote attackers to write arbitrary files on the server. It is crucial to update to the patched version 1.3-2.1 to mitigate this risk. Implementing input validation can serve as a temporary workaround until the update is applied.

See every vulnerability recorded for libcommons-fileupload-java →

Share this vulnerability

FAQ

CVE-2013-2186 is a vulnerability in the libcommons-fileupload-java package that allows remote attackers to write to arbitrary files via a NULL byte in a file name.

You can use Vulert, a tool that monitors open-source vulnerabilities in your software. By uploading your manifest file like package-lock.json, Vulert can alert you in real-time about any vulnerabilities, including CVE-2013-2186.

The risks include unauthorized file access, potential data breaches, and the possibility of executing malicious code on the server.

Yes, implementing strict input validation on file names can help mitigate the risk until you can apply the necessary updates.

More information can be found in the official CVE database and on the Debian security advisories page.

Related vulnerabilities

Recent vulnerabilities recorded for libcommons-fileupload-java.

How To Fix

Minimum fixed version

1.3-2.1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libcommons-fileupload-java

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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