Summary
CVE-2026-61741 is a Critical XML External Entity (XXE) injection vulnerability (CWE-611) affecting http4s-scala-xml, the Scala XML integration module for the http4s HTTP library ecosystem. The library’s XML entity decoders relied on an unsecured SAXParserFactory instance that resolved DOCTYPE declarations and external general/parameter entities by default. A remote, unauthenticated attacker can exploit this by submitting a crafted XML payload to any endpoint that decodes XML via the affected module, potentially disclosing local files, performing server-side request forgery (SSRF) against internal network resources, or causing denial of service through entity expansion.
Technical details
- Root cause:
http4s-scala-xml‘s XML entity decoders instantiatedSAXParserFactorywithout secure-processing hardening, so DOCTYPE declarations and external entity resolution were permitted by default — unlikescala.xml.XMLLoader, which has disabled these by default since version 2.0.0. - Trigger conditions: Any application endpoint that uses the library’s
EntityDecoderfor XML (built onElemInstances#saxFactory) to parse attacker-controlled XML request bodies is vulnerable. - Attack vector: Network-based, requires no authentication and no user interaction. An attacker sends a crafted XML document containing external entity declarations (e.g., referencing local files or internal/external URLs) as part of an HTTP request.
- Impact: Confidentiality impact is high (arbitrary local file disclosure, SSRF against internal services), and availability impact is low (denial of service via entity expansion / "billion laughs"-style attacks). The vulnerability has a Changed scope, meaning it can affect resources beyond the vulnerable component itself.
Affected software
org.http4s:http4s-scala-xml_2.12versions ≤ 0.24.0org.http4s:http4s-scala-xml_2.13versions ≤ 0.24.0, and versions ≥ 1.0.0-M1 through 1.0.0-M38.1org.http4s:http4s-scala-xml_3versions ≤ 0.24.0, and versions ≥ 1.0.0-M1 through 1.0.0-M38.1
Severity
- CVSS v3.1 Base Score: 9.3 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L
Mitigation and recommended actions
- Immediate: Upgrade
http4s-scala-xmlto version 0.24.1 (0.24.x line) or 1.0.0-M39 (1.0.0-M line), both of which enforce secure XML processing by default, disable DOCTYPE declarations, and disallow external entity resolution. - If patching is not immediately possible: Override the module’s
ElemInstances#saxFactorywith a hardenedSAXParserFactoryconfiguration that sets thehttp://apache.org/xml/features/disallow-doctype-declfeature totrueand disables external general/parameter entity resolution, consistent with OWASP XXE Prevention guidance. - Audit any service endpoints that accept and parse XML input for exposure to untrusted external entity payloads, and monitor for anomalous outbound requests or file-read attempts originating from XML-parsing components.

