Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
9.3

CVE-2026-61741: http4s-scala-xml can expose files or network via XML

CVE-2026-61741 · published 3 days ago
Summary

The http4s-scala-xml library parses XML without safe settings, so malicious XML can read local files, contact internal services, or crash the application. Any system that uses this library to handle untrusted XML is at risk. Update to the latest version or configure the parser to disable external entities before upgrading.

What to do
  • Update org.http4s:http4s-scala-xml_2.12 to version 0.24.1.
  • Update org.http4s:http4s-scala-xml_2.13 to version 0.24.1.
  • Update org.http4s:http4s-scala-xml_2.13 to version 1.0.0-M39.
  • Update org.http4s:http4s-scala-xml_3 to version 0.24.1.
  • Update org.http4s:http4s-scala-xml_3 to version 1.0.0-M39.
Affected software
Ecosystem VendorProductAffected versions
– http4s http4s-scala-xml < 0.24.1
maven – org.http4s:http4s-scala-xml_2.12 <= 0.24.0
Fix: upgrade to 0.24.1
maven – org.http4s:http4s-scala-xml_2.13 <= 0.24.0
>= 1.0.0-M1, <= 1.0.0-M38.1
Fix: upgrade to 0.24.1
maven – org.http4s:http4s-scala-xml_3 <= 0.24.0
>= 1.0.0-M1, <= 1.0.0-M38.1
Fix: upgrade to 0.24.1
Original advisory text
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
- `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._
```
Severity
9.3 Critical
CVSS 3.1: 9.3 (MITRE)
Exploitation
EPSS <1%
Type
CWE-611XML External Entity (XXE)
Timeline
Published24 Sep 2026
Updated26 Sep 2026
First seen24 Sep 2026
Sources
CVE-2026-61741 · MITRE
Track software like this
Free during beta