GHSA-cjx3-73hr-rpw7
http4s-scala-xml has an XML External Entity (XXE) processing issue
Quick fix
GHSA-cjx3-73hr-rpw7 — org.http4s:http4s-scala-xml_2.12: upgrade to the fixed version with the command below.
# pom.xml: bump <version>0.24.1</version> for org.http4s:http4s-scala-xml_2.12Details
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 - `DOCTYPE` declarations 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.
```scala 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._ ```
Are you affected?
Enter the version of the package you're using.
Affected packages
0Fixed in: 0.24.1# pom.xml: bump <version>0.24.1</version> for org.http4s:http4s-scala-xml_2.120Fixed in: 0.24.1# pom.xml: bump <version>0.24.1</version> for org.http4s:http4s-scala-xml_2.131.0.0-M1Fixed in: 1.0.0-M39# pom.xml: bump <version>1.0.0-M39</version> for org.http4s:http4s-scala-xml_2.130Fixed in: 0.24.1# pom.xml: bump <version>0.24.1</version> for org.http4s:http4s-scala-xml_31.0.0-M1Fixed in: 1.0.0-M39# pom.xml: bump <version>1.0.0-M39</version> for org.http4s:http4s-scala-xml_3References
- https://github.com/http4s/http4s-scala-xml/security/advisories/GHSA-cjx3-73hr-rpw7[WEB]
- https://nvd.nist.gov/vuln/detail/CVE-2026-61741[ADVISORY]
- https://github.com/http4s/http4s-scala-xml/commit/326f965a2c45fc2ddbc22545dcf551b0f719f4c8[WEB]
- https://github.com/http4s/http4s-scala-xml[PACKAGE]
- https://github.com/http4s/http4s-scala-xml/releases/tag/v0.24.1[WEB]
- https://github.com/http4s/http4s-scala-xml/releases/tag/v1.0.0-M39[WEB]