CVE-2017-18197 in mxGraphinfo

Summary

by MITRE

In mxGraphViewImageReader.java in mxGraph before 3.7.6, the SAXParserFactory instance in convert() is missing flags to prevent XML External Entity (XXE) attacks, as demonstrated by /ServerView.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 02/08/2023

The vulnerability described in CVE-2017-18197 represents a critical XML External Entity processing flaw within the mxGraph library version 3.7.5 and earlier. This issue resides in the mxGraphViewImageReader.java file where the SAXParserFactory instance is improperly configured during the convert() method execution. The absence of proper security flags in the SAXParserFactory configuration creates an exploitable vector for XML External Entity attacks that can be leveraged by malicious actors to access sensitive system resources or perform unauthorized operations.

The technical flaw stems from the library's failure to disable external entity resolution and secure processing features within the SAX parser configuration. When the convert() method processes XML input, it does not set the necessary properties to prevent the parser from resolving external entities or accessing local files through the XML document. This misconfiguration allows attackers to craft malicious XML payloads that can trigger the parser to access arbitrary files on the server filesystem, perform server-side request forgery attacks, or even execute denial of service operations against the target system. The vulnerability specifically affects the ServerView component of the mxGraph framework, making it particularly concerning for web applications that process user-supplied XML data through this library.

The operational impact of this vulnerability extends beyond simple information disclosure, as it can enable attackers to perform various malicious activities including file system traversal, remote code execution, and service disruption. An attacker could potentially read sensitive files from the server, access internal network resources, or cause the application to consume excessive resources through malicious XML entities. The vulnerability is particularly dangerous in web applications that accept XML input from untrusted sources, as it allows for server-side exploitation without requiring authentication or specific user interaction. The flaw affects the entire mxGraph ecosystem and its various implementations, making it a widespread concern for organizations using this library in their web applications and server-side processing components.

Organizations should immediately upgrade to mxGraph version 3.7.6 or later where the proper security configurations have been implemented to prevent XXE attacks. The recommended mitigation includes ensuring that all SAXParserFactory instances are configured with setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) and setProperty("http://apache.org/xml/properties/locale", Locale.getDefault()) to disable external entity resolution and secure processing features. Additionally, implementing proper input validation and sanitization of XML content, along with network-level restrictions to prevent access to sensitive resources, provides additional layers of defense. This vulnerability aligns with CWE-611 (Improper Restriction of XML External Entity Reference) and maps to ATT&CK technique T1213.002 (External Remote Services) as it enables unauthorized access to system resources through XML processing. Security teams should also consider implementing web application firewalls and monitoring for suspicious XML parsing activities to detect potential exploitation attempts.

Reservation

02/23/2018

Disclosure

02/23/2018

Moderation

accepted

CPE

ready

EPSS

0.00440

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!