Summary
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.
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._
Impact
Any service that derives an XML EntityDecoder from this library and parses attacker-controlled input is affected.
An XML parser processes external entity references in untrusted input, causing the server to fetch internal resources or remote URLs. Typical impact: local file disclosure, server-side request forgery, or denial of service.
CVE-2026-61741 has a CVSS score of 9.3 (Critical). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.24.1, 1.0.0-M39); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
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.
Frequently Asked Questions
- What is CVE-2026-61741? CVE-2026-61741 is a critical-severity XML external entity injection (XXE) vulnerability in org.http4s:http4s-scala-xml_2.12 (maven), affecting versions <= 0.24.0. It is fixed in 0.24.1, 1.0.0-M39. An XML parser processes external entity references in untrusted input, causing the server to fetch internal resources or remote URLs.
- How severe is CVE-2026-61741? CVE-2026-61741 has a CVSS score of 9.3 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which packages are affected by CVE-2026-61741?
org.http4s:http4s-scala-xml_2.12(maven) (versions <= 0.24.0)org.http4s:http4s-scala-xml_2.13(maven) (versions <= 0.24.0)org.http4s:http4s-scala-xml_3(maven) (versions <= 0.24.0)
- Is there a fix for CVE-2026-61741? Yes. CVE-2026-61741 is fixed in 0.24.1, 1.0.0-M39. Upgrade to this version or later.
- Is CVE-2026-61741 exploitable, and should I be worried? Whether CVE-2026-61741 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-61741 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-61741?
- Upgrade
org.http4s:http4s-scala-xml_2.12to 0.24.1 or later - Upgrade
org.http4s:http4s-scala-xml_2.13to 0.24.1 or later - Upgrade
org.http4s:http4s-scala-xml_2.13to 1.0.0-M39 or later - Upgrade
org.http4s:http4s-scala-xml_3to 0.24.1 or later - Upgrade
org.http4s:http4s-scala-xml_3to 1.0.0-M39 or later
- Upgrade