GHSA-CJX3-73HR-RPW7

Vulnerability from github – Published: 2026-09-24 19:35 – Updated: 2026-09-24 19:35
VLAI
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._
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.24.0"
      },
      "package": {
        "ecosystem": "Maven",
        "name": "org.http4s:http4s-scala-xml_2.12"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.24.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.24.0"
      },
      "package": {
        "ecosystem": "Maven",
        "name": "org.http4s:http4s-scala-xml_2.13"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.24.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 1.0.0-M38.1"
      },
      "package": {
        "ecosystem": "Maven",
        "name": "org.http4s:http4s-scala-xml_2.13"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.0.0-M1"
            },
            {
              "fixed": "1.0.0-M39"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.24.0"
      },
      "package": {
        "ecosystem": "Maven",
        "name": "org.http4s:http4s-scala-xml_3"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.24.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 1.0.0-M38.1"
      },
      "package": {
        "ecosystem": "Maven",
        "name": "org.http4s:http4s-scala-xml_3"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.0.0-M1"
            },
            {
              "fixed": "1.0.0-M39"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-61741"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-611"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-09-24T19:35:16Z",
    "nvd_published_at": "2026-09-24T18:17:16Z",
    "severity": "CRITICAL"
  },
  "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\u0027s default settings, the parser resolves DOCTYPE declarations, external general and parameter entities, and external DTDs.\n\nAn application that uses these decoders to parse untrusted XML is vulnerable to XML External Entity (XXE) attacks.  An attacker can craft a request that:\n\n- discloses local files readable by the service process,\n- performs server-side request forgery (SSRF) against internal network resources, and/or\n- causes denial of service through entity expansion.\n\n### Impact\n\nAny service that derives an XML `EntityDecoder` from this library and parses attacker-controlled input is affected.\n\n### Patches\n\nThe default SAXParserFactory is now hardened: \n- secure processing is enabled\n- `DOCTYPE` declarations are disallowed\n- external general/parameter entities and external DTD loading are disabled\n- DTD URIs are not resolved\n- XInclude is disabled.\n\nThese defaults match `scala.xml.XMLLoader`\u0027s defaults since 2.0.0.\n\n### Workarounds\n\nBefore upgrading, override `ElemInstances#saxFactory` with a hardened factory.\n\n```scala\n  val secured = new ElemInstances {\n    override protected val saxFactory = {\n      val f = javax.xml.parsers.SAXParserFactory.newInstance\n      f.setFeature(\"http://apache.org/xml/features/disallow-doctype-decl\", true)\n      // etc.\n      f\n    }\n  }\n  import secured._\n```",
  "id": "GHSA-cjx3-73hr-rpw7",
  "modified": "2026-09-24T19:35:16Z",
  "published": "2026-09-24T19:35:16Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/http4s/http4s-scala-xml/security/advisories/GHSA-cjx3-73hr-rpw7"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-61741"
    },
    {
      "type": "WEB",
      "url": "https://github.com/http4s/http4s-scala-xml/commit/326f965a2c45fc2ddbc22545dcf551b0f719f4c8"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/http4s/http4s-scala-xml"
    },
    {
      "type": "WEB",
      "url": "https://github.com/http4s/http4s-scala-xml/releases/tag/v0.24.1"
    },
    {
      "type": "WEB",
      "url": "https://github.com/http4s/http4s-scala-xml/releases/tag/v1.0.0-M39"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "http4s-scala-xml has an XML External Entity (XXE) processing issue"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…