Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS01OHF3LXA3cW0tNXJ2aM4AA0ib

Eclipse Jetty XmlParser allows arbitrary DOCTYPE declarations

From the reporter

XmlParser is vulnerable to XML external entity (XXE) vulnerability.
XmlParser is being used when parsing Jetty’s xml configuration files. An attacker might exploit
this vulnerability in order to achieve SSRF or cause a denial of service.
One possible scenario is importing a (remote) malicious WAR into a Jetty’s server, while the
WAR includes a malicious web.xml.

Impact

There are no circumstances in a normally deployed Jetty server where potentially hostile XML is given to the XmlParser class without the attacker already having arbitrary access to the server. I.e. in order to exploit XmlParser the attacker would already have the ability to deploy and execute hostile code. Specifically, Jetty has no protection against malicious web application and potentially hostile web applications should only be run on an isolated virtualisation.

Thus this is not considered a vulnerability of the Jetty server itself, as any such usage of the jetty XmlParser is equally vulnerable as a direct usage of the JVM supplied SAX parser. No CVE will be allocated to this advisory.

However, any direct usage of the XmlParser class by an application may be vulnerable. The impact would greatly depend on how the application uses XmlParser, but it could be a denial of service due to large entity expansion, or possibly the revealing local files if the XML results are accessible remotely.

Patches

Ability to configure the SAXParserFactory to fit the needs of your particular XML parser implementation have been merged as part of PR #10067

Workarounds

Don't use XmlParser to parse data from users.

Permalink: https://github.com/advisories/GHSA-58qw-p7qm-5rvh
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS01OHF3LXA3cW0tNXJ2aM4AA0ib
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Low
Classification: General
Published: over 1 year ago
Updated: 2 months ago


CVSS Score: 3.9
CVSS vector: CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L

Identifiers: GHSA-58qw-p7qm-5rvh
References: Repository: https://github.com/eclipse/jetty.project
Blast Radius: 13.8

Affected Packages

maven:org.eclipse.jetty:jetty-xml
Dependent packages: 465
Dependent repositories: 3,541
Downloads:
Affected Version Ranges: <= 9.4.51, >= 12.0.0.alpha0, <= 12.0.0.beta4, >= 10.0.0-alpha0, <= 10.0.15, >= 11.0.0-alpha0, <= 11.0.15
Fixed in: 9.4.52.v20230823, 12.0.0, 10.0.16, 11.0.16
All affected versions: 10.0.0, 10.0.0-alpha0, 10.0.1, 10.0.2, 10.0.3, 10.0.4, 10.0.5, 10.0.6, 10.0.7, 10.0.8, 10.0.9, 10.0.10, 10.0.11, 10.0.12, 10.0.13, 10.0.14, 10.0.15, 10.0.16, 10.0.17, 10.0.18, 10.0.19, 10.0.20, 10.0.21, 10.0.22, 10.0.23, 10.0.24, 11.0.0, 11.0.0-alpha0, 11.0.1, 11.0.2, 11.0.3, 11.0.4, 11.0.5, 11.0.6, 11.0.7, 11.0.8, 11.0.9, 11.0.10, 11.0.11, 11.0.12, 11.0.13, 11.0.14, 11.0.15, 11.0.16, 11.0.17, 11.0.18, 11.0.19, 11.0.20, 11.0.21, 11.0.22, 11.0.23, 11.0.24, 12.0.0, 12.0.1, 12.0.2, 12.0.3, 12.0.4, 12.0.5, 12.0.6, 12.0.7, 12.0.8, 12.0.9, 12.0.10, 12.0.11, 12.0.12, 12.0.13, 12.0.14, 12.0.15
All unaffected versions: