http4s-scala-xml has an XML External Entity (XXE) processing issue
http4s-scala-xml
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| org.http4s:http4s-scala-xml_2.12 Maven |
|
|
| org.http4s:http4s-scala-xml_2.13 Maven |
|
|
http4s-scala-xml
| Product | Affected | Fixed in |
|---|---|---|
| org.http4s:http4s-scala-xml_2.12 Maven |
|
|
| org.http4s:http4s-scala-xml_2.13 Maven |
|
|
1.0.0-M39| org.http4s:http4s-scala-xml_3 Maven |
|
|
http4s-scala-xml provides `EntityDecoder[F, scala.xml.Elem]` instances that parse XML message bodies. Prior to versions 0.24.1 and 1.0.0-M39, these decoders used a `javax.xml.parsers.SAXParserFactory` obtained from `SAXParserFactory.newInstance` without any security configuration. With the JDK's default settings, the parser resolves DOCTYPE declarations, external general and parameter entities, and external DTDs.An application that uses these decoders to parse untrusted XML is vulnerable to XML External Entity (XXE) attacks. An attacker can craft a request that discloses local files readable by the service process, performs server-side request forgery (SSRF) against internal network resources, and/or causes denial of service through entity expansion. Versions 0.24.1 and 1.0.0-M39 fix the issue.
From the CVE record · GitHub_M
The XML entity decoders in http4s-scala-xml use a SAX parser that, with JDK defaults, resolves external entities and DTDs. If an application parses untrusted XML with these decoders, an attacker can craft a request to read files accessible to the service, reach internal network resources, or cause denial of service through entity expansion.
Check applications using Maven org.http4s:http4s-scala-xml_2.12 below 0.24.1, or org.http4s:http4s-scala-xml_2.13 or _3 below 0.24.1 or from 1.0.0-M1 through versions before 1.0.0-M39.