http4s-scala-xml has an XML External Entity (XXE) processing issue
http4s-scala-xml provides EntityDecoder[F, scala.xml.Elem] instances that parse XML message bodies. 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.
Impact
Any service that derives an XML EntityDecoder from this library and parses attacker-controlled input is affected.
Patches
The default SAXParserFactory is now hardened:
- secure processing is enabled
DOCTYPEdeclarations are disallowed- external general/parameter entities and external DTD loading are disabled
- DTD URIs are not resolved
- XInclude is disabled.
These defaults match scala.xml.XMLLoader's defaults since 2.0.0.
Workarounds
Before upgrading, override ElemInstances#saxFactory with a hardened factory.
val secured = new ElemInstances {
override protected val saxFactory = {
val f = javax.xml.parsers.SAXParserFactory.newInstance
f.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true)
// etc.
f
}
}
import secured._
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Java / Kotlin (Maven) | org.http4s:http4s-scala-xml_2.12 | < 0.24.1 | 0.24.1 |
| Java / Kotlin (Maven) | org.http4s:http4s-scala-xml_2.13 | < 0.24.1, >= 1.0.0-M1, < 1.0.0-M39 | 0.24.1, 1.0.0-M39 |
| Java / Kotlin (Maven) | org.http4s:http4s-scala-xml_3 | < 0.24.1, >= 1.0.0-M1, < 1.0.0-M39 | 0.24.1, 1.0.0-M39 |
Verweise
- https://github.com/http4s/http4s-scala-xml/security/advisories/GHSA-cjx3-73hr-rpw7
- https://nvd.nist.gov/vuln/detail/CVE-2026-61741
- https://github.com/http4s/http4s-scala-xml/commit/326f965a2c45fc2ddbc22545dcf551b0f719f4c8
- https://github.com/http4s/http4s-scala-xml
- https://github.com/http4s/http4s-scala-xml/releases/tag/v0.24.1
- https://github.com/http4s/http4s-scala-xml/releases/tag/v1.0.0-M39
- CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L- Schwäche (CWE)
CWE-611- Plattform
- Java / Kotlin (Maven)
- Paket
org.http4s:http4s-scala-xml_2.12, org.http4s:http4s-scala-xml_2.13, org.http4s:http4s-scala-xml_3- Veröffentlicht
- 24.09.2026
- Aktualisiert
- 11.10.2026 13:20
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-cjx3-73hr-rpw7 - CC BY 4.0
Schwachstellenhistorie: org.http4s:http4s-scala-xml_2.12
Alle veröffentlichten Schwachstellen dieses Pakets (Java / Kotlin (Maven)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
Dies ist die einzige bekannte Schwachstelle dieses Pakets.
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.