# CVE-2022-0239: Stanford CoreNLP XXE injection in XML parsing

Source: https://junglewise.ai/threats/cve-2022-0239-stanford-corenlp-xxe-injection-in-xml-parsing  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-01-21. Updated: 2026-05-11  
License: CC BY 4.0 with a link back

CVE-2022-0239 · Severity: critical · CVSS 9.8 · Published 2022-01-21

Stanford CoreNLP, a widely used natural language processing library, is vulnerable to a security flaw that allows attackers to manipulate how the software processes XML data. By submitting specially crafted files, an attacker could potentially read sensitive files from the server, access internal network resources, or cause a service outage. This could lead to the exposure of confidential business data or disruption of automated text analysis workflows.

Technologies: [edu.stanford.nlp:stanford-corenlp (Maven)](https://junglewise.ai/threats/technologies/edu-stanford-nlp-stanford-corenlp). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven).

## Quick answers

**Is CVE-2022-0239 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-0239 being exploited in the wild.

**How severe is CVE-2022-0239?** Critical severity, with a CVSS score of 9.8, published 21 January 2022.

**Which products and versions are affected?** edu.stanford.nlp:stanford-corenlp (Maven) <= 4.3.2, ECOSYSTEM:introduced=0,fixed=4.4.0; Stanford NLP Group CoreNLP <= 4.3.2.

**Is there a fix for CVE-2022-0239?** Yes. edu.stanford.nlp:stanford-corenlp (Maven): upgrade to 4.4.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2022-0239 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2022-0239?** Check whether you run edu.stanford.nlp:stanford-corenlp (Maven) or Stanford NLP Group CoreNLP 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

- edu.stanford.nlp:stanford-corenlp (Maven): upgrade to 4.4.0 or later

  ```sh
  # set edu.stanford.nlp:stanford-corenlp to 4.4.0 in your pom.xml or build.gradle
  ```


## Technical details

Stanford CoreNLP (versions 4.3.2 and earlier) is vulnerable to an XML External Entity (XXE) injection vulnerability (CWE-611). The root cause is the improper restriction of XML external entity references when parsing XML documents. A remote, unauthenticated attacker can exploit this by sending a malicious XML payload to an endpoint that utilizes the vulnerable library. Successful exploitation can lead to the disclosure of local files (arbitrary file read), server-side request forgery (SSRF), and denial-of-service (DoS) attacks. The vulnerability has been addressed in version 4.4.0.

## Affected products

- Stanford NLP Group CoreNLP <= 4.3.2

## Identifiers

- CVE-2022-0239
- GHSA-75vw-3m5v-fprh

## Timeline

- 2022-01-17: advisory: NVD published CVE-2022-0239
- 2022-01-21: advisory: GitHub Advisory published
- 2022-01-21: patched: Version 4.4.0 released

## References

- [https://api.github.com/users/RainSignal](https://api.github.com/users/RainSignal)
- [https://github.com/RainSignal](https://github.com/RainSignal)
- [https://api.github.com/users/RainSignal/gists%7B/gist_id%7D](https://api.github.com/users/RainSignal/gists%7B/gist_id%7D)
- [https://api.github.com/users/RainSignal/repos](https://api.github.com/users/RainSignal/repos)
- [https://avatars.githubusercontent.com/u/101503193?v=4](https://avatars.githubusercontent.com/u/101503193?v=4)
- [https://api.github.com/users/RainSignal/events%7B/privacy%7D](https://api.github.com/users/RainSignal/events%7B/privacy%7D)

## Related threats

- [Improper Restriction of XML External Entity Reference in Stanford CoreNLP](https://junglewise.ai/threats/cve-2021-3869-improper-restriction-of-xml-external-entity-reference-in-stanford)
- [Improper Restriction of XML External Entity Reference in Stanford CoreNLP](https://junglewise.ai/threats/cve-2021-3878-improper-restriction-of-xml-external-entity-reference-in-stanford)
- [Access Control vulnerability within CoreNLP](https://junglewise.ai/threats/cve-2021-44550-access-control-vulnerability-within-corenlp)
- [XML External Entity Reference in edu.stanford.nlp:stanford-corenlp](https://junglewise.ai/threats/cve-2022-0198-xml-external-entity-reference-in-edu-stanford-nlp-stanford-corenlp)
