CVE-2018-11758: Cayenne parent XML External Entity Reference Vulnerability

HIGH
Advisory Identifier: GHSA-85hw-w436-c725
CVSS 8.1
CWE-611
Published
Advisory Summary

CVE-2018-11758 is a HIGH (CVSS 8.1) xml external entity reference vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Cayenne parent libraries in the Maven ecosystem. The issue involves xml external entity reference in apache cayenne. Remediation is available by upgrading affected packages to version 3.1.3, 4.1.

CVE-2018-11758 at a Glance

CVE Identifier CVE-2018-11758
GHSA Identifier GHSA-85hw-w436-c725
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Cayenne parent
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.1

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

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

How to Fix CVE-2018-11758

To remediate this vulnerability, upgrade all affected Cayenne parent 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.apache.cayenne:cayenne-parent fixed: 3.1.3
<dependency>
    <groupId>org.apache.cayenne</groupId>
    <artifactId>cayenne-parent</artifactId>
    <version>3.1.3</version>
</dependency>
org.apache.cayenne:cayenne-parent fixed: 4.1
<dependency>
    <groupId>org.apache.cayenne</groupId>
    <artifactId>cayenne-parent</artifactId>
    <version>4.1</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.apache.cayenne

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.apache.cayenne

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

Note: The mvn dependency:tree -Dincludes=org.apache.cayenne 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 Cayenne parent, 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

This affects Apache Cayenne 4.1.M1, 3.2.M1, 4.0.M2 to 4.0.M5, 4.0.B1, 4.0.B2, 4.0.RC1, 3.1, 3.1.1, 3.1.2. CayenneModeler is a desktop GUI tool shipped with Apache Cayenne and intended for editing Cayenne ORM models stored as XML files. If an attacker tricks a user of CayenneModeler into opening a malicious XML file, the attacker will be able to instruct the XML parser built into CayenneModeler to transfer files from a local machine to a remote machine controlled by the attacker. The cause of the issue is XML parser processing XML External Entity (XXE) declarations included in XML. The vulnerability is addressed in Cayenne by disabling XXE processing in all operations that require XML parsing.

CVE-2018-11758 Affected Cayenne parent Versions

2 component(s)
Fixed Versions:
3.1.34.1
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.cayenne:cayenne-parent
Maven
< 3.1.3
3.1.3
org.apache.cayenne:cayenne-parent
Maven
≥ 4.0
< 4.1
4.1

References

Frequently Asked Questions

What is CVE-2018-11758?
CVE-2018-11758 is a security vulnerability in Cayenne parent involving XML External Entity Reference in Apache Cayenne under CWE-611: Improper Restriction of XML External Entity Reference.
Which Cayenne parent versions are affected?
Affected versions include releases prior to 3.1.3, 4.1 across affected packages: org.apache.cayenne:cayenne-parent.
What version fixes CVE-2018-11758?
Upgrading to 3.1.3, 4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cayenne-parent affected?
Yes, org.apache.cayenne:cayenne-parent is affected in releases prior to 3.1.3, 4.1. Upgrade your dependency to 3.1.3, 4.1 or later.
What is the CVSS score of CVE-2018-11758?
CVE-2018-11758 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2018-11758?
CVE-2018-11758 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-2018-11758?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.cayenne'. 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-85hw-w436-c725",
  "modified" : "2022-11-04T20:37:08Z",
  "published" : "2022-05-14T02:02:28Z",
  "aliases" : [ "CVE-2018-11758" ],
  "summary" : "XML External Entity Reference in Apache Cayenne",
  "details" : "This affects Apache Cayenne 4.1.M1, 3.2.M1, 4.0.M2 to 4.0.M5, 4.0.B1, 4.0.B2, 4.0.RC1, 3.1, 3.1.1, 3.1.2. CayenneModeler is a desktop GUI tool shipped with Apache Cayenne and intended for editing Cayenne ORM models stored as XML files. If an attacker tricks a user of CayenneModeler into opening a malicious XML file, the attacker will be able to instruct the XML parser built into CayenneModeler to transfer files from a local machine to a remote machine controlled by the attacker. The cause of the issue is XML parser processing XML External Entity (XXE) declarations included in XML. The vulnerability is addressed in Cayenne by disabling XXE processing in all operations that require XML parsing.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.cayenne:cayenne-parent"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.1.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.cayenne:cayenne-parent"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0"
      }, {
        "fixed" : "4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-11758"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/ed60a4d329be3c722f105317ca883986dfcd17615c70d1df87f4528c@%3Cuser.cayenne.apache.org%3E"
  }, {
    "type" : "PACKAGE",
    "url" : "apache/cayenne"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-04T20:37:08Z",
    "nvd_published_at" : "2018-08-22T20:29:00Z"
  }
}