Vulnerabilities in pkg:maven/org.jdom/jdom2

PACKAGE
Advisory Identifier: GHSA-2363-cqg2-863c
Advisory Summary

CVE-2021-33813 is a HIGH (CVSS 7.5) xml external entity (xxe) injection vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Jdom2 libraries in the Maven ecosystem. The issue involves xml external entity (xxe) injection in jdom. Remediation is available by upgrading affected packages to version 2.0.6.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.jdom/jdom2

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.jdom/jdom2. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-2363-cqg2-863c CVE-2021-33813 HIGH XML External Entity (XXE) Injection in JDOM

CVE-2021-33813 at a Glance

CVE Identifier CVE-2021-33813
GHSA Identifier GHSA-2363-cqg2-863c
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Jdom2
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2021-33813

To remediate this vulnerability, upgrade all affected Jdom2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.jdom:jdom2 fixed: 2.0.6.1
<dependency>
    <groupId>org.jdom</groupId>
    <artifactId>jdom2</artifactId>
    <version>2.0.6.1</version>
</dependency>
org.jdom:jdom fixed: Latest secure release
<dependency>
    <groupId>org.jdom</groupId>
    <artifactId>jdom</artifactId>
    <version>Latest secure release</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.jdom

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2021-33813, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.jdom

Analyze the terminal output to locate any version of Jdom2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.6.1), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.jdom command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Jdom2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

An XXE issue in SAXBuilder in JDOM through 2.0.6 allows attackers to cause a denial of service via a crafted HTTP request. As a workaround, to avoid external entities being expanded, one can call `builder.setExpandEntities(false)` and they won't be expanded.

CVE-2021-33813 Affected Jdom2 Versions

2 component(s)
Fixed Versions:
2.0.6.1
Product / Package Ecosystem Affected Versions Fixed Version
org.jdom:jdom2
Maven
< 2.0.6.1
2.0.6.1
org.jdom:jdom
Maven
≤ 2.0.2

References

NVD — CVE-2021-33813 NVD
https://nvd.nist.gov/vuln/detail/CVE-2021-33813
Jdom2 Source Repository REPOSITORY
https://github.com/hunterhacker/jdom/issues/189
Jdom2 Source Repository REPOSITORY
https://github.com/hunterhacker/jdom/pull/188
Security Fix Commit FIX COMMIT
https://github.com/hunterhacker/jdom/commit/dd4f3c2fc7893edd914954c73eb577f925a7d361
Jdom2 Security Information SECURITY
https://www.oracle.com/security-alerts/cpujul2022.html
Jdom2 Security Information SECURITY
https://www.oracle.com/security-alerts/cpuapr2022.html
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EWFVYTHGILOQXUA7U3SPOERQXL7OPSZG
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AH46QHE5GIMT6BL6C3GDTOYF27JYILXM
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2021/07/msg00012.html
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2021/06/msg00026.html
lists.apache.org/thread.html/rfb7a93... WEB
https://lists.apache.org/thread.html/rfb7a93e40ebeb1e0068cde0bf3834dcab46bb1ef06d6424db48ed9fd@%3Cdev.tika.apache.org%3E
lists.apache.org/thread.html/rbc075a... WEB
https://lists.apache.org/thread.html/rbc075a4ac85e7a8e47420b7383f16ffa0af3b792b8423584735f369f@%3Cissues.solr.apache.org%3E
lists.apache.org/thread.html/r9974f6... WEB
https://lists.apache.org/thread.html/r9974f64723875052e02787b2a5eda689ac5247c71b827d455e5dc9a6@%3Cissues.solr.apache.org%3E
lists.apache.org/thread.html/r89b380... WEB
https://lists.apache.org/thread.html/r89b3800cfabb1e773e49425e5d4239c28a659839a2eca6af3431482e@%3Cissues.solr.apache.org%3E
lists.apache.org/thread.html/r845e98... WEB
https://lists.apache.org/thread.html/r845e987b7cd8efe610284958e997b84583f5a98d3394adc09e3482fe@%3Cissues.solr.apache.org%3E
lists.apache.org/thread.html/r6db397... WEB
https://lists.apache.org/thread.html/r6db397ae7281ead825338200d1f62d2827585a70797cc9ac0c4bd23f@%3Cissues.solr.apache.org%3E
lists.apache.org/thread.html/r567410... WEB
https://lists.apache.org/thread.html/r5674106135bb1a6ef57483f4c63a9c44bca85d0e2a8a05895a8f1d89@%3Cissues.solr.apache.org%3E
lists.apache.org/thread.html/r21c406... WEB
https://lists.apache.org/thread.html/r21c406c7ed88fe340db7dbae75e58355159e6c324037c7d5547bf40b@%3Cissues.solr.apache.org%3E
Jdom2 Release RELEASE
https://github.com/hunterhacker/jdom/releases/tag/JDOM-2.0.6.1
Jdom2 Source Repository REPOSITORY
https://github.com/hunterhacker/jdom/releases
Jdom2 Source Repository REPOSITORY
https://github.com/hunterhacker/jdom
Jdom2 Security Information SECURITY
https://alephsecurity.com/vulns/aleph-2021003

Frequently Asked Questions

What is CVE-2021-33813?
CVE-2021-33813 is a security vulnerability in Jdom2 involving XML External Entity (XXE) Injection in JDOM under CWE-611: Improper Restriction of XML External Entity Reference.
Which Jdom2 versions are affected?
Affected versions include releases prior to 2.0.6.1 across affected packages: org.jdom:jdom2, org.jdom:jdom.
What version fixes CVE-2021-33813?
Upgrading to 2.0.6.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jdom2 affected?
Yes, org.jdom:jdom2 is affected in releases prior to 2.0.6.1. Upgrade your dependency to 2.0.6.1 or later.
Is jdom affected?
Yes, org.jdom:jdom is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2021-33813?
CVE-2021-33813 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2021-33813?
CVE-2021-33813 is classified under CWE-611: Improper Restriction of XML External Entity Reference (The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.).
How can I check Maven dependencies for CVE-2021-33813?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.jdom'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2363-cqg2-863c",
  "modified" : "2025-09-16T15:06:10Z",
  "published" : "2021-07-27T19:02:56Z",
  "aliases" : [ "CVE-2021-33813" ],
  "summary" : "XML External Entity (XXE) Injection in JDOM",
  "details" : "An XXE issue in SAXBuilder in JDOM through 2.0.6 allows attackers to cause a denial of service via a crafted HTTP request. As a workaround, to avoid external entities being expanded, one can call `builder.setExpandEntities(false)` and they won't be expanded.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jdom:jdom2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.6.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jdom:jdom"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-33813"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hunterhacker/jdom/issues/189"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hunterhacker/jdom/pull/188"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hunterhacker/jdom/commit/dd4f3c2fc7893edd914954c73eb577f925a7d361"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2022.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EWFVYTHGILOQXUA7U3SPOERQXL7OPSZG"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AH46QHE5GIMT6BL6C3GDTOYF27JYILXM"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2021/07/msg00012.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2021/06/msg00026.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rfb7a93e40ebeb1e0068cde0bf3834dcab46bb1ef06d6424db48ed9fd@%3Cdev.tika.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rbc075a4ac85e7a8e47420b7383f16ffa0af3b792b8423584735f369f@%3Cissues.solr.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r9974f64723875052e02787b2a5eda689ac5247c71b827d455e5dc9a6@%3Cissues.solr.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r89b3800cfabb1e773e49425e5d4239c28a659839a2eca6af3431482e@%3Cissues.solr.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r845e987b7cd8efe610284958e997b84583f5a98d3394adc09e3482fe@%3Cissues.solr.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r6db397ae7281ead825338200d1f62d2827585a70797cc9ac0c4bd23f@%3Cissues.solr.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r5674106135bb1a6ef57483f4c63a9c44bca85d0e2a8a05895a8f1d89@%3Cissues.solr.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r21c406c7ed88fe340db7dbae75e58355159e6c324037c7d5547bf40b@%3Cissues.solr.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hunterhacker/jdom/releases/tag/JDOM-2.0.6.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hunterhacker/jdom/releases"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/hunterhacker/jdom"
  }, {
    "type" : "WEB",
    "url" : "https://alephsecurity.com/vulns/aleph-2021003"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-07-27T19:02:41Z",
    "nvd_published_at" : "2021-06-16T12:15:00Z"
  }
}