CVE-2016-6798 XML External Entity Reference in Apache Sling

Critical 9.8 Published Updated

An attacker can exploit insecure XML parsing in Apache Sling to read sensitive files, perform SSRF, or cause denial of service.

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

CVE-2016-6798 is a critical vulnerability in Apache Sling, published on 19 Jul 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In the XSS Protection API module before 1.0.12 in Apache Sling, the method XSS.getValidXML() uses an insecure SAX parser to validate the input string, which allows for XXE attacks in all scripts which use this method to validate user input, potentially allowing an attacker to read sensitive data on the filesystem, perform same-site-request-forgery (SSRF), port-scanning behind the firewall or DoS the application.

Weakness: CWE-611

Which versions are affected by CVE-2016-6798?

4 open source packages ship an affected version, including org.apache.sling:org.apache.sling.xss and org.apache.sling:org.apache.sling.xss.compat. It affects 1 product.

PackageAffectedFixed in
org.apache.sling:org.apache.sling.xss MavenAll versions1.0.12
org.apache.sling:org.apache.sling.xss MavenAll versions1.0.12
org.apache.sling:org.apache.sling.xss.compat MavenAll versions1.1.0
org.apache.sling:org.apache.sling.xss.compat MavenAll versions1.1.0

Products include Apache Sling.

How do I fix CVE-2016-6798?

Upgrade org.apache.sling:org.apache.sling.xss to 1.0.12 or later.

Is CVE-2016-6798 being exploited?

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

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-7g54-vgp6-jj5w.

Is CVE-2016-6798 in your software?

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

Check your SBOMs for free