CVE-2016-3087 Apache Struts vulnerable to arbitrary remote code execution due to improper input validation

Critical 9.8 Published Updated

Remote attackers can execute arbitrary code via the REST Plugin when Dynamic Method Invocation is enabled.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2016-3087?

CVE-2016-3087 is a critical code injection vulnerability in Apache Struts, published on 7 Jun 2016. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Apache Struts 2.3.19 to 2.3.20.2, 2.3.21 to 2.3.24.1, and 2.3.25 to 2.3.28, when Dynamic Method Invocation is enabled, allow remote attackers to execute arbitrary code via vectors related to an ! (exclamation mark) operator to the REST Plugin.

Weakness: CWE-20

Which versions are affected by CVE-2016-3087?

6 open source packages ship an affected version, including org.apache.struts:struts2-core. It affects 1 product.

PackageAffectedFixed in
org.apache.struts:struts2-core MavenFrom 2.3.192.3.20.3
org.apache.struts:struts2-core MavenFrom 2.3.192.3.20.3
org.apache.struts:struts2-core MavenFrom 2.3.212.3.24.3
org.apache.struts:struts2-core MavenFrom 2.3.212.3.24.3
org.apache.struts:struts2-core MavenFrom 2.3.252.3.28.1
org.apache.struts:struts2-core MavenFrom 2.3.252.3.28.1

Products include Apache Struts.

How do I fix CVE-2016-3087?

Upgrade org.apache.struts:struts2-core to a fixed version for your release line: 2.3.20.3, 2.3.24.3 or 2.3.28.1.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2016-3087 being exploited?

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

Public exploit code: 1 Metasploit module and 2 Exploit-DB entries.

All Apache Struts vulnerabilities

Sources

Also known as GHSA-mmj6-cjj4-hpr5.

Is CVE-2016-3087 in your software?

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

Check your SBOMs for free