CVE-2012-0392 Apache Struts's CookieInterceptor component does not use the parameter-name whitelist
Remote attackers can execute arbitrary commands via crafted HTTP cookies in Apache Struts due to missing parameter whitelisting in the CookieInterceptor.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2012-0392?
CVE-2012-0392 is a medium-severity code injection vulnerability in Apache Struts, published on 8 Jan 2012. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The CookieInterceptor component in Apache Struts before 2.3.1.1 does not use the parameter-name whitelist, which allows remote attackers to execute arbitrary commands via a crafted HTTP Cookie header that triggers Java code execution through a static method.
Which versions are affected by CVE-2012-0392?
4 open source packages ship an affected version, including org.apache.struts.xwork:xwork-core and org.apache.struts:struts2-core. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.struts.xwork:xwork-core Maven | All versions | 2.2.3.1 |
org.apache.struts.xwork:xwork-core Maven | All versions | 2.2.3.1 |
org.apache.struts:struts2-core Maven | All versions | 2.2.3.1 |
org.apache.struts:struts2-core Maven | All versions | 2.2.3.1 |
Products include Apache Struts.
How do I fix CVE-2012-0392?
Upgrade org.apache.struts.xwork:xwork-core to 2.2.3.1 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2012-0392 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2012-0392 exists.
Public exploit code: 1 Exploit-DB entry and 1 Nuclei template.
Other vulnerabilities in Apache Struts
Sources
Also known as GHSA-2ppp-xj34-vvf7.