Symlink Attack Vulnerability in Apache Commons FileUpload - libcommons-fileupload-java

libcommons-fileupload-java Updated 02 Oct 2025

Summary

15/03/2013
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2013-0248: The default configuration of javax.servlet.context.tempdir in Apache Commons FileUpload 1.0 through 1.2.2 uses the /tmp directory for uploaded files, which allows local users to overwrite arbitrary files via an unspecifi... Affects libcommons-fileupload-java versions < 1.3-1. Fixed in 1.3-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 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

libcommons-fileupload-java is a Java library that provides support for handling file uploads in web applications. It is widely used in conjunction with Java Servlet technology to facilitate the uploading of files from clients to servers. The library's functionality includes managing file uploads, providing file size limits, and handling multipart requests. However, earlier versions of this library, specifically from 1.0 to 1.2.2, have a critical vulnerability that exposes applications to potential file overwrite attacks due to improper handling of temporary file storage.

Vulnerability Detail

The vulnerability arises from the default configuration of the javax.servlet.context.tempdir in Apache Commons FileUpload versions 1.0 through 1.2.2, which uses the /tmp directory for storing uploaded files. This configuration allows local users to exploit a symlink attack, where they can create symbolic links to arbitrary files in the system. When the file upload occurs, the library may inadvertently overwrite these files, leading to data loss or corruption, and potentially allowing unauthorized access to sensitive information.

How To Fix

Minimum fixed version

1.3-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 change the configuration to use a different directory for storing uploaded files that is not accessible to local users. This can be done by setting the javax.servlet.context.tempdir to a secure directory in your web application's configuration.

Conclusion

The vulnerability in libcommons-fileupload-java poses a significant risk due to its potential for exploitation through symlink attacks. It is crucial for developers to update to the latest version to mitigate this risk and ensure the security of their applications. Additionally, utilizing tools like Vulert can help maintain ongoing vigilance against such vulnerabilities.

See every vulnerability recorded for libcommons-fileupload-java →

Share this vulnerability

FAQ

A symlink attack occurs when an attacker creates a symbolic link to a sensitive file, tricking a program into overwriting that file instead of the intended target.

Versions 1.0 through 1.2.2 of libcommons-fileupload-java are affected by this vulnerability.

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

If left unaddressed, this vulnerability can lead to unauthorized file access, data loss, and potential system compromise.

Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software using just a manifest file like package-lock.json.

Related vulnerabilities

Recent vulnerabilities recorded for libcommons-fileupload-java.

How To Fix

Minimum fixed version

1.3-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