CVE-2013-2134: Struts2 core Arbitrary Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-gqqm-564f-vvxq
CWE-94
Published
Advisory Summary

CVE-2013-2134 is a HIGH arbitrary code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Struts2 core libraries in the Maven ecosystem. The issue involves arbitrary code execution in apache struts 2. Remediation is available by upgrading affected packages to version 2.3.14.3.

CVE-2013-2134 at a Glance

CVE Identifier CVE-2013-2134
GHSA Identifier GHSA-gqqm-564f-vvxq
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Struts2 core
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2013-2134

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

org.apache.struts:struts2-core fixed: 2.3.14.3
<dependency>
    <groupId>org.apache.struts</groupId>
    <artifactId>struts2-core</artifactId>
    <version>2.3.14.3</version>
</dependency>
org.apache.struts.xwork:xwork-core fixed: 2.3.14.3
<dependency>
    <groupId>org.apache.struts.xwork</groupId>
    <artifactId>xwork-core</artifactId>
    <version>2.3.14.3</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=org.apache.struts

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.apache.struts

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

Note: The mvn dependency:tree -Dincludes=org.apache.struts 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Struts2 core, 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

Apache Struts 2 before 2.3.14.3 allows remote attackers to execute arbitrary OGNL code via a request with a crafted action name that is not properly handled during wildcard matching, a different vulnerability than CVE-2013-2135.

CVE-2013-2134 Affected Struts2 core Versions

2 component(s)
Fixed Versions:
2.3.14.3
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.struts:struts2-core
Maven
≥ 2.0.0
< 2.3.14.3
2.3.14.3
org.apache.struts.xwork:xwork-core
Maven
≥ 2.0.0
< 2.3.14.3
2.3.14.3

References

NVD — CVE-2013-2134 NVD
https://nvd.nist.gov/vuln/detail/CVE-2013-2134
Security Fix Commit FIX COMMIT
https://github.com/apache/struts/commit/01e6b251b4db78bfb7971033652e81d1af4cb3e0
Security Fix Commit FIX COMMIT
https://github.com/apache/struts/commit/041206d2a693d02c0cb2e72765275e55ba14049f
Security Fix Commit FIX COMMIT
https://github.com/apache/struts/commit/113c47082c09818bcef65acc436a2d0c7c47aa6c
Security Fix Commit FIX COMMIT
https://github.com/apache/struts/commit/54e5c912ebd9a1599bfcf7a719da17c28127bbe3
Security Fix Commit FIX COMMIT
https://github.com/apache/struts/commit/711cf0201cdd319a38cf29238913312355db29ba
Security Fix Commit FIX COMMIT
https://github.com/apache/struts/commit/8b4fc81daeea3834bcbf73de5f48d0021917aa37
Security Fix Commit FIX COMMIT
https://github.com/apache/struts/commit/cfb6e9afbae320a4dd5bdd655154ab9fe5a92c16
cwiki.apache.org/confluence/display/... WEB
https://cwiki.apache.org/confluence/display/WW/S2-015
Struts2 core Source Repository REPOSITORY
https://github.com/apache/struts
issues.apache.org/jira/browse/ww-4090 WEB
https://issues.apache.org/jira/browse/WW-4090
issues.apache.org/jira/browse/ww-4094 WEB
https://issues.apache.org/jira/browse/WW-4094
issues.apache.org/jira/browse/ww-4095 WEB
https://issues.apache.org/jira/browse/WW-4095
Struts2 core Security Information SECURITY
https://web.archive.org/web/20140226173351/http://www.securityfocus.com/bid/60346
Struts2 core Security Information SECURITY
https://web.archive.org/web/20140410223942/http://www.securityfocus.com/bid/64758
Struts2 core Security Information SECURITY
http://security.gentoo.org/glsa/glsa-201409-04.xml
struts.apache.org/development/2.x/doc... WEB
http://struts.apache.org/development/2.x/docs/s2-015.html
Struts2 core Security Information SECURITY
http://www.oracle.com/technetwork/topics/security/cpujan2014-1972949.html
Struts2 core Security Information SECURITY
http://www.oracle.com/technetwork/topics/security/cpuoct2013-1899837.html

Frequently Asked Questions

What is CVE-2013-2134?
CVE-2013-2134 is a security vulnerability in Struts2 core involving Arbitrary code execution in Apache Struts 2 under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Struts2 core versions are affected?
Affected versions include releases prior to 2.3.14.3 across affected packages: org.apache.struts:struts2-core, org.apache.struts.xwork:xwork-core.
What version fixes CVE-2013-2134?
Upgrading to 2.3.14.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is struts2-core affected?
Yes, org.apache.struts:struts2-core is affected in releases prior to 2.3.14.3. Upgrade your dependency to 2.3.14.3 or later.
Is xwork-core affected?
Yes, org.apache.struts.xwork:xwork-core is affected in releases prior to 2.3.14.3. Upgrade your dependency to 2.3.14.3 or later.
What CWE is associated with CVE-2013-2134?
CVE-2013-2134 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2013-2134?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.struts'. 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-gqqm-564f-vvxq",
  "modified" : "2023-08-16T09:30:57Z",
  "published" : "2022-05-14T01:57:02Z",
  "aliases" : [ "CVE-2013-2134" ],
  "summary" : "Arbitrary code execution in Apache Struts 2",
  "details" : "Apache Struts 2 before 2.3.14.3 allows remote attackers to execute arbitrary OGNL code via a request with a crafted action name that is not properly handled during wildcard matching, a different vulnerability than CVE-2013-2135.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.struts:struts2-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.3.14.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.struts.xwork:xwork-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.3.14.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-2134"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/struts/commit/01e6b251b4db78bfb7971033652e81d1af4cb3e0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/struts/commit/041206d2a693d02c0cb2e72765275e55ba14049f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/struts/commit/113c47082c09818bcef65acc436a2d0c7c47aa6c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/struts/commit/54e5c912ebd9a1599bfcf7a719da17c28127bbe3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/struts/commit/711cf0201cdd319a38cf29238913312355db29ba"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/struts/commit/8b4fc81daeea3834bcbf73de5f48d0021917aa37"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/struts/commit/cfb6e9afbae320a4dd5bdd655154ab9fe5a92c16"
  }, {
    "type" : "WEB",
    "url" : "https://cwiki.apache.org/confluence/display/WW/S2-015"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/struts"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/WW-4090"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/WW-4094"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/WW-4095"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20140226173351/http://www.securityfocus.com/bid/60346"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20140410223942/http://www.securityfocus.com/bid/64758"
  }, {
    "type" : "WEB",
    "url" : "http://security.gentoo.org/glsa/glsa-201409-04.xml"
  }, {
    "type" : "WEB",
    "url" : "http://struts.apache.org/development/2.x/docs/s2-015.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/topics/security/cpujan2014-1972949.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/topics/security/cpuoct2013-1899837.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-03T21:07:40Z",
    "nvd_published_at" : "2013-07-16T18:55:00Z"
  }
}