Quick answers
- Is CVE-2017-18197 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2017-18197 being exploited in the wild.
- How severe is CVE-2017-18197?
- Low severity, with a CVSS score of 3, published 14 May 2022.
- Which products and versions are affected?
- mxgraph (npm) SEMVER:introduced=0,fixed=3.7.6.
- Is there a fix for CVE-2017-18197?
- Yes. mxgraph (npm): upgrade to 3.7.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2017-18197 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2017-18197?
- Check whether you run mxgraph (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- mxgraph (npm): upgrade to 3.7.6 or later
npm install mxgraph@3.7.6
Technical details
The vulnerability exists in mxGraphViewImageReader.java's convert() method, which uses SAXParserFactory to parse XML but fails to disable external entity resolution and DOCTYPE declarations. An attacker can craft malicious XML payloads containing external entity definitions to read arbitrary files from the affected system or trigger out-of-memory conditions. The vulnerability requires the application to process user-supplied XML input and affects all versions before 3.7.6. The fix involves setting appropriate SAX parser features (XXE-preventive flags) as demonstrated in ExportServlet.java example code.
Affected products
- JGraph mxGraph before 3.7.6
Identifiers
- CVE-2017-18197
- GHSA-wvpv-8524-wg6x
Timeline
- 2017-11-22: disclosed
- 3.7.6: patched
- 2022-05-14: advisory