CVE-2012-0393 Apache Struts's ParameterInterceptor component does not prevent access to public constructors

Medium 6.4 Published Updated

Remote attackers can execute arbitrary code or overwrite files by exploiting improper access controls in Apache Struts parameter handling.

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-0393?

CVE-2012-0393 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 ParameterInterceptor component in Apache Struts before 2.3.1.1 does not prevent access to public constructors, which allows remote attackers to create or overwrite arbitrary files via a crafted parameter that triggers the creation of a Java object.

Weakness: CWE-264

Which versions are affected by CVE-2012-0393?

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.

PackageAffectedFixed in
org.apache.struts.xwork:xwork-core MavenAll versions2.2.3.1
org.apache.struts.xwork:xwork-core MavenAll versions2.2.3.1
org.apache.struts:struts2-core MavenAll versions2.3.1.1
org.apache.struts:struts2-core MavenAll versions2.3.1.1

Products include Apache Struts.

How do I fix CVE-2012-0393?

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-0393 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2012-0393 exists.

Public exploit code: 1 Exploit-DB entry.

All Apache Struts vulnerabilities

Sources

Also known as GHSA-hxqq-w4mr-mc62.

Is CVE-2012-0393 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free