CVE-2016-6812 Improper Neutralization of Input During Web Page Generation in Apache CXF

Medium 6.1 Published Updated

An attacker can inject matrix parameters into the request URL to trigger Cross-Site Scripting in the Apache CXF HTTP transport module's service list page.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2016-6812?

CVE-2016-6812 is a medium-severity cross-site scripting vulnerability in Apache Cxf, published on 10 Aug 2017. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

The HTTP transport module in Apache CXF prior to 3.0.12 and 3.1.x prior to 3.1.9 uses FormattedServiceListWriter to provide an HTML page which lists the names and absolute URL addresses of the available service endpoints. The module calculates the base URL using the current HttpServletRequest. The calculated base URL is used by FormattedServiceListWriter to build the service endpoint absolute URLs. If the unexpected matrix parameters have been injected into the request URL then these matrix parameters will find their way back to the client in the services list page which represents an XSS risk to the client.

Weakness: CWE-79

Which versions are affected by CVE-2016-6812?

4 open source packages ship an affected version, including org.apache.cxf:cxf-core. It affects 1 product.

PackageAffectedFixed in
org.apache.cxf:cxf-core MavenAll versions3.0.12
org.apache.cxf:cxf-core MavenAll versions3.0.12
org.apache.cxf:cxf-core MavenFrom 3.1.03.1.9
org.apache.cxf:cxf-core MavenFrom 3.1.03.1.9

Products include Apache Cxf.

How do I fix CVE-2016-6812?

Upgrade org.apache.cxf:cxf-core to a fixed version for your release line: 3.0.12 or 3.1.9.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2016-6812 being exploited?

There is no known exploitation of CVE-2016-6812 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Apache Cxf vulnerabilities

Sources

Also known as GHSA-vw2c-5wph-v92r.

Is CVE-2016-6812 in your software?

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

Check your SBOMs for free