CVE-2021-39239 XML External Entity (XXE) vulnerability
An attacker can exploit XML processing flaws in Apache Jena to read local files and send them to a remote server.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-39239?
CVE-2021-39239 is a high-severity vulnerability in Apache Jena, published on 16 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
A vulnerability in XML processing in Apache Jena, in versions up to 4.1.0, may allow an attacker to execute XML External Entities (XXE), including exposing the contents of local files to a remote server.
Weakness: CWE-611
Which versions are affected by CVE-2021-39239?
2 open source packages ship an affected version, including org.apache.jena:jena-core. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.jena:jena-core Maven | All versions | 4.2.0 |
org.apache.jena:jena-core Maven | All versions | 4.2.0 |
Products include Apache Jena.
How do I fix CVE-2021-39239?
Upgrade org.apache.jena:jena-core to 4.2.0 or later.
Is CVE-2021-39239 being exploited?
There is no known exploitation of CVE-2021-39239 in the wild and no public exploit code.
Other vulnerabilities in Apache Jena
- CVE-2022-28890 Processing external DTDs
- CVE-2025-50151 Apache Jena: Configuration files uploaded by administrative users are not check properly
- CVE-2023-32200 Apache Jena: Exposure of execution in script engine expressions.
- CVE-2025-49656 Apache Jena: Administrative users can create files outside the server directory space via the admin UI
- CVE-2023-22665 Apache Jena: Exposure of arbitrary execution in script engine expressions.
Sources
Also known as DEBIAN-CVE-2021-39239, GHSA-7rp6-w7mg-h8rw, UBUNTU-CVE-2021-39239.