CVE-2012-0394 apache struts: Code Injection
apache struts: no CVSS score yet. EPSS 73% estimated probability of exploitation activity in the next 30 days. Fixed in org.apache.struts.xwork:xwork-core 2.3.18.
On this page
- EPSS
- 73% (unchanged from 73% a week ago; 73% 30 days ago) estimated probability of exploitation activity in the next 30 days; 99th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
- CWE
- CWE-94 Improper Control of Generation of Code (Code Injection)
- OWASP Top 10
- A05:2025 Injection
- Published
- Modified
- NVD analysis
- Analyzed, since modified
- Record from
- the NVD, synced
Fix and patched versions
org.apache.struts.xwork:xwork-core(Maven): fixed in 2.3.18- Vendor advisory: http://struts.apache.org/2.x/docs/s2-008.html
- Vendor advisory: http://struts.apache.org/2.x/docs/version-notes-2311.html
Ask an AI about this CVE
Show the prompt
Explain CVE-2012-0394 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2012-0394?via=ask-ai-copy and https://cve.bz/cve/CVE-2012-0394?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2012-0394 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
Affected
Versions
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| apache:struts | from 2.0.0 through 2.3.17 |
Packages (OSV)
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-hmvj-gc9q-mg9p | Maven | org.apache.struts.xwork:xwork-core | <2.3.18 | 2.3.18 |
Red Hat
Red Hat rates this Moderate.
A previous statement by Red Hat related to this CVE, prior to August 2019, said that Apache Struts 2 is not included in any Red Hat products. This earlier statement was incorrect. While Struts 2 is not actively compiled, shipped, used, or enabled in any Red Hat provided final products, and does not cause any vulnerability in the product, struts2-core jars have been included in some products' source code packages. The inclusion was part of an import of the Google Guice repository, which includes struts2-core. Customers that build artefacts from our source code could be at risk. Red Hat will remove these artefacts from source code in future releases.
The products that included the Struts 2 artefacts in their source jars:
Fuse Service Works 6.0.0
Single Sign On 7.3.0+
If you have used the source package from one of these products to build artefacts on your system, you should do the following to remove potentially affected jars:
1. Run 'find . -name struts2*.jar' under the source location
2. Remove any files found
This will not affect the product, as the jar is included with the source of google-guice, but no functionality requiring struts2 is implemented.
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2012-0394.
Public exploits
- Exploit-DB Apache Struts - Developer Mode OGNL Execution (Metasploit)
- Exploit-DB Apache Struts 2 < 2.3.1 - Multiple Vulnerabilities
- Metasploit Apache Struts 2 Developer Mode OGNL Execution
Detection rules
Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.
- Nuclei template Apache Struts <2.3.1.1 - Remote Code Execution
Attack patterns (CAPEC)
- CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
- CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
- CAPEC-242 Code Injection Likelihood: High · Severity: High
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.
References
- http://struts.apache.org/2.x/docs/s2-008.html
- http://struts.apache.org/2.x/docs/version-notes-2311.html
- http://archives.neohapsis.com/archives/bugtraq/2012-01/0031.html
- http://www.exploit-db.com/exploits/18329
- http://www.exploit-db.com/exploits/31434
- http://www.osvdb.org/78276
- https://www.sec-consult.com/files/20120104-0_Apache_Struts2_Multiple_Critical_Vulnerabilities.txt