Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-61741

http4s-scala-xml has an XML External Entity (XXE) processing issue
Back to all
CVE

CVE-2026-61741

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.

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

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
9.3
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L
C
H
U
9.1
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L

Related Resources

No items found.

References

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

Severity

9.3

CVSS Score
0
10

Basic Information

Base CVSS
9.3
EPSS Probability
0.00294%
EPSS Percentile
0.20711%
Introduced Version
0.23.12,1.0.0-M21,1.0.0-M38,1.0-2-79831c5,1.0.0-M33,1.0.0-M22,0.23.0
Fix Available
0.24.1,1.0.0-M39

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading