Vulnerability GHSA-cjx3-73hr-rpw7

Critical
CRITICAL RISK
CVSS Score: 9.3
Score Range: 9.0–10.0
Critical severity vulnerabilities (CVSS 9.0–10.0). These represent the highest impact issues.
3 days ago
September 24, 2026 at 07:35 PM UTC
http4s-scala-xml has an XML External Entity (XXE) processing issue
0.15.0 and 0.15.1 and 0.15.2 and 0.15.3 and 0.15.4 and 0.15.5 and 0.15.6 and 0.15.7 and 0.15.8 and 0.15.9 and 0.15.10 and 0.15.11 and 0.15.12 and 0.15.13 and 0.15.14 and 0.15.15 and 0.15.16 and 0.16.0 and 0.16.1 and 0.16.2 and 0.16.3 and 0.16.4 and 0.16.5 and 0.16.6 and 0.19.0 and 0.24.0
0.15.0 and 0.15.1 and 0.15.2 and 0.15.3 and 0.15.4 and 0.15.5 and 0.15.6 and 0.15.7 and 0.15.8 and 0.15.9 and 0.15.10 and 0.15.11 and 0.15.12 and 0.15.13 and 0.15.14 and 0.15.15 and 0.15.16 and 0.16.0 and 0.16.1 and 0.16.2 and 0.16.3 and 0.16.4 and 0.16.5 and 0.16.6 and 0.19.0 and 0.24.0

Summary

http4s-scala-xml has an XML External Entity (XXE) processing issue

Details

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.

  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._

Timeline

Published
3 days ago
September 24, 2026 at 07:35 PM UTC
Fixed (0.24.1)
Unknown
Unknown
Fixed (0.24.1)
Unknown
Unknown
Fixed (1.0.0-M39)
Unknown
Unknown
Fixed (0.24.1)
Unknown
Unknown
Fixed (1.0.0-M39)
Unknown
Unknown
Last Modified
3 days ago
September 24, 2026 at 07:45 PM UTC