CVE-2018-20318
Description
An XXE vulnerability in weixin-java-tools v3.2.0 allows attackers to read files or perform SSRF via crafted XML in payment result processing.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
An XXE vulnerability in weixin-java-tools v3.2.0 allows attackers to read files or perform SSRF via crafted XML in payment result processing.
Vulnerability
The vulnerability resides in the getXmlDoc method of BaseWxPayResult.java in weixin-java-tools v3.2.0. The method creates an XML parser without disabling external entity processing, leading to an XML External Entity (XXE) vulnerability [1]. This code path is reachable when the application processes XML data from WeChat payment results, which are typically supplied by an external source.
Exploitation
An attacker can exploit this by crafting a malicious XML payload containing an external entity that references a local file (e.g., file:///etc/passwd) or an external URL. The attacker does not need authentication if they can control the XML input, for example by intercepting or spoofing a payment notification. The XML parser will resolve the external entity, allowing the attacker to read sensitive files or perform Server-Side Request Forgery (SSRF) [1].
Impact
Successful exploitation enables an attacker to read arbitrary files from the server's filesystem, potentially exposing configuration files, credentials, or other sensitive data. Additionally, SSRF attacks can be used to probe internal network resources, leading to further compromise [1].
Mitigation
As of the publication date, the issue was reported to the maintainers via GitHub [1]. Users should upgrade to a patched version once available. As a workaround, developers can manually disable external entity processing in the XML parser configuration (e.g., by setting DocumentBuilderFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true)). No fixed version is explicitly mentioned in the reference, so users should monitor the repository for updates [1].
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2- Range: 1.0.0, v1.1.1, v1.1.2, …
- Range: =3.2.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
1- github.com/Wechat-Group/weixin-java-tools/issues/889mitrex_refsource_MISC
News mentions
0No linked articles in our index yet.