Critical severity9.8NVD Advisory· Published Jul 4, 2016· Updated May 6, 2026
CVE-2016-4438
CVE-2016-4438
Description
The REST plugin in Apache Struts 2 2.3.19 through 2.3.28.1 allows remote attackers to execute arbitrary code via a crafted expression.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
org.apache.struts:struts2-coreMaven | >= 2.3.19, < 2.3.29 | 2.3.29 |
org.apache.struts:struts2-rest-pluginMaven | >= 2.3.19, < 2.3.29 | 2.3.29 |
Affected products
7cpe:2.3:a:apache:struts:2.3.20:*:*:*:*:*:*:*+ 6 more
- cpe:2.3:a:apache:struts:2.3.20:*:*:*:*:*:*:*
- cpe:2.3:a:apache:struts:2.3.20.1:*:*:*:*:*:*:*
- cpe:2.3:a:apache:struts:2.3.20.3:*:*:*:*:*:*:*
- cpe:2.3:a:apache:struts:2.3.24:*:*:*:*:*:*:*
- cpe:2.3:a:apache:struts:2.3.24.1:*:*:*:*:*:*:*
- cpe:2.3:a:apache:struts:2.3.24.3:*:*:*:*:*:*:*
- cpe:2.3:a:apache:struts:2.3.28:*:*:*:*:*:*:*
Patches
41 file changed · +1 −1
plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java+1 −1 modified@@ -320,7 +320,7 @@ private void handleDynamicMethodInvocation(ActionMapping mapping, String name) { mapping.setName(actionName); if (allowDynamicMethodCalls) { - mapping.setMethod(actionMethod); + mapping.setMethod(cleanupActionName(actionMethod)); } else { mapping.setMethod(null); }
1 file changed · +1 −1
plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java+1 −1 modified@@ -311,7 +311,7 @@ private void handleDynamicMethodInvocation(ActionMapping mapping, String name) { mapping.setName(actionName); if (allowDynamicMethodCalls) { - mapping.setMethod(actionMethod); + mapping.setMethod(cleanupActionName(actionMethod)); } else { mapping.setMethod(null); }
1 file changed · +4 −4
core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java+4 −4 modified@@ -136,7 +136,7 @@ public DefaultActionMapper() { put(METHOD_PREFIX, new ParameterAction() { public void execute(String key, ActionMapping mapping) { if (allowDynamicMethodCalls) { - mapping.setMethod(key.substring(METHOD_PREFIX.length())); + mapping.setMethod(cleanupActionName(key.substring(METHOD_PREFIX.length()))); } } }); @@ -148,7 +148,7 @@ public void execute(final String key, ActionMapping mapping) { if (allowDynamicMethodCalls) { int bang = name.indexOf('!'); if (bang != -1) { - String method = name.substring(bang + 1); + String method = cleanupActionName(name.substring(bang + 1)); mapping.setMethod(method); name = name.substring(0, bang); } @@ -385,15 +385,15 @@ protected String cleanupActionName(final String rawActionName) { return rawActionName; } else { if (LOG.isWarnEnabled()) { - LOG.warn("Action [#0] does not match allowed action names pattern [#1], cleaning it up!", + LOG.warn("Action/method [#0] does not match allowed action names pattern [#1], cleaning it up!", rawActionName, allowedActionNames); } String cleanActionName = rawActionName; for (String chunk : allowedActionNames.split(rawActionName)) { cleanActionName = cleanActionName.replace(chunk, ""); } if (LOG.isDebugEnabled()) { - LOG.debug("Cleaned action name [#0]", cleanActionName); + LOG.debug("Cleaned action/method name [#0]", cleanActionName); } return cleanActionName; }
1 file changed · +2 −2
core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java+2 −2 modified@@ -136,7 +136,7 @@ public DefaultActionMapper() { put(METHOD_PREFIX, new ParameterAction() { public void execute(String key, ActionMapping mapping) { if (allowDynamicMethodCalls) { - mapping.setMethod(key.substring(METHOD_PREFIX.length())); + mapping.setMethod(cleanupActionName(key.substring(METHOD_PREFIX.length()))); } } }); @@ -148,7 +148,7 @@ public void execute(final String key, ActionMapping mapping) { if (allowDynamicMethodCalls) { int bang = name.indexOf('!'); if (bang != -1) { - String method = name.substring(bang + 1); + String method = cleanupActionName(name.substring(bang + 1)); mapping.setMethod(method); name = name.substring(0, bang); }
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
12- jvn.jp/en/jp/JVN07710476/index.htmlnvdVendor AdvisoryWEB
- jvndb.jvn.jp/jvndb/JVNDB-2016-000110nvdVDB EntryVendor AdvisoryWEB
- www.securityfocus.com/bid/91275nvdThird Party Advisory
- bugzilla.redhat.com/show_bug.cginvdIssue TrackingThird Party AdvisoryVDB EntryWEB
- github.com/advisories/GHSA-4prj-vw9j-v6prghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2016-4438ghsaADVISORY
- struts.apache.org/docs/s2-037.htmlnvdVendor AdvisoryWEB
- github.com/apache/struts/commit/6d7ac40dcede1793a4534a3dc249fd562d495e8cghsaWEB
- github.com/apache/struts/commit/76eb8f38a33ad0f1f48464ee1311559c8d52dd6dghsaWEB
- github.com/apache/struts/commit/c9c21378f2fb2ff21355c128c45e106ebd87ad7cghsaWEB
- github.com/apache/struts/commit/deefeffd11425f0cd0b797cd86a9b3550234262bghsaWEB
- www.oracle.com/technetwork/security-advisory/cpujul2017-3236622.htmlnvd
News mentions
0No linked articles in our index yet.