CVE-2026-61741: http4s-scala-xml has an XML External Entity (XXE) processing issue

Published Sep 24, 2026
·
Updated

http4s-scala-xml provides EntityDecoder[F, scala.xml.Elem] instances that parse XML message bodies. Prior to versions 0.24.1 and 1.0.0-M39, 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. Versions 0.24.1 and 1.0.0-M39 fix the issue.

Other sources

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.

— GitHub

Affected Software

6 affected componentsFixes available
maven/org.http4s/http4s-scala-xml<0.24.1, <1.0.0-M39
maven/org.http4s:http4s-scala-xml_3>=1.0.0-M1<=1.0.0-M38.1
1.0.0-M39
maven/org.http4s:http4s-scala-xml_3<=0.24.0
0.24.1
maven/org.http4s:http4s-scala-xml_2.13>=1.0.0-M1<=1.0.0-M38.1
1.0.0-M39
maven/org.http4s:http4s-scala-xml_2.13<=0.24.0
0.24.1
maven/org.http4s:http4s-scala-xml_2.12<=0.24.0
0.24.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.http4s:http4s-scala-xml_3 to a version that resolves this vulnerability.

    Fixed in 1.0.0-M39
  2. Upgrade

    Upgrade maven/org.http4s:http4s-scala-xml_3 to a version that resolves this vulnerability.

    Fixed in 0.24.1
  3. Upgrade

    Upgrade maven/org.http4s:http4s-scala-xml_2.13 to a version that resolves this vulnerability.

    Fixed in 1.0.0-M39
  4. Upgrade

    Upgrade maven/org.http4s:http4s-scala-xml_2.13 to a version that resolves this vulnerability.

    Fixed in 0.24.1
  5. Upgrade

    Upgrade maven/org.http4s:http4s-scala-xml_2.12 to a version that resolves this vulnerability.

    Fixed in 0.24.1
  6. Upgrade

    Upgrade http4s-scala-xml to a version that resolves this vulnerability.

    Fixed in 0.24.1
  7. Upgrade

    Upgrade http4s-scala-xml to a version that resolves this vulnerability.

    Fixed in 1.0.0-M39
  8. Configuration

    Before upgrading, override ElemInstances#saxFactory with a hardened SAXParserFactory and set the disallow-doctype-decl feature to true.

    http4s-scala-xml EntityDecoder http://apache.org/xml/features/disallow-doctype-decl = true

Event History

Sep 24, 2026
CVE Published
via MITRE·05:48 PM
Data Sourced
via MITRE·05:48 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:17 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·07:35 PM
Data Sourced
via GitHub·07:35 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications are exposed if they use http4s-scala-xml EntityDecoder instances for scala.xml.Elem to parse XML request bodies from untrusted sources. The vulnerable behavior occurs with the JDK's default XML parser settings.

2

Does an attacker need authentication or user interaction to exploit it?

No. The vector is network-based with low attack complexity, and exploitation requires neither privileges nor user interaction; the attacker needs to be able to submit crafted XML to an affected decoder.

3

What can an attacker do through successful exploitation?

An attacker can disclose local files readable by the service process, make server-side requests to internal network resources, or cause denial of service through XML entity expansion.

4

Which versions address the issue?

Version 0.24.1 and version 1.0.0-M39 fix the issue.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203