CVE-2013-0248: Commons fileupload Incorrect Default Permissions Vulnerability

LOW
Advisory Identifier: GHSA-vm69-474v-7q2w
CWE-276
Published
Advisory Summary

CVE-2013-0248 is a LOW incorrect default permissions vulnerability (CWE-276: Incorrect Default Permissions) affecting Commons fileupload libraries in the Maven ecosystem. The issue involves incorrect default permissions in apache commons fileupload. Remediation is available by upgrading affected packages to version 1.2.2.

CVE-2013-0248 at a Glance

CVE Identifier CVE-2013-0248
GHSA Identifier GHSA-vm69-474v-7q2w
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-276: Incorrect Default Permissions
Affected Product Commons fileupload
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2013-0248

To remediate this vulnerability, upgrade all affected Commons fileupload dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

commons-fileupload:commons-fileupload fixed: 1.2.2
<dependency>
    <groupId>commons-fileupload</groupId>
    <artifactId>commons-fileupload</artifactId>
    <version>1.2.2</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=commons-fileupload

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2013-0248, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=commons-fileupload

Analyze the terminal output to locate any version of Commons fileupload in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.2), your application is affected.

Note: The mvn dependency:tree -Dincludes=commons-fileupload command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-276: Incorrect Default Permissions, where during installation, installed file permissions are set to allow anyone to modify those files. In Commons fileupload, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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 unspecified symlink attack.

CVE-2013-0248 Affected Commons fileupload Versions

1 component(s)
Fixed Versions:
1.2.2
Product / Package Ecosystem Affected Versions Fixed Version
commons-fileupload:commons-fileupload
Maven
≥ 1.0
< 1.2.2
1.2.2

References

Frequently Asked Questions

What is CVE-2013-0248?
CVE-2013-0248 is a security vulnerability in Commons fileupload involving Incorrect Default Permissions in Apache Commons FileUpload under CWE-276: Incorrect Default Permissions.
Which Commons fileupload versions are affected?
Affected versions include releases prior to 1.2.2 across affected packages: commons-fileupload:commons-fileupload.
What version fixes CVE-2013-0248?
Upgrading to 1.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is commons-fileupload affected?
Yes, commons-fileupload:commons-fileupload is affected in releases prior to 1.2.2. Upgrade your dependency to 1.2.2 or later.
What CWE is associated with CVE-2013-0248?
CVE-2013-0248 is classified under CWE-276: Incorrect Default Permissions (During installation, installed file permissions are set to allow anyone to modify those files.).
How can I check Maven dependencies for CVE-2013-0248?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=commons-fileupload'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vm69-474v-7q2w",
  "modified" : "2022-07-08T18:59:32Z",
  "published" : "2022-05-05T02:48:41Z",
  "aliases" : [ "CVE-2013-0248" ],
  "summary" : "Incorrect Default Permissions in Apache Commons FileUpload",
  "details" : "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 unspecified symlink attack.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "commons-fileupload:commons-fileupload"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0"
      }, {
        "fixed" : "1.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-0248"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202107-39"
  }, {
    "type" : "WEB",
    "url" : "http://archives.neohapsis.com/archives/bugtraq/2013-03/0035.html"
  }, {
    "type" : "WEB",
    "url" : "http://marc.info/?l=bugtraq&m=144050155601375&w=2"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.osvdb.org/90906"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-276" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-08T18:59:32Z",
    "nvd_published_at" : "2013-03-15T20:55:00Z"
  }
}