# CVE-2018-11758: XML External Entity Reference in Apache Cayenne

> An attacker can read local files or cause denial of service by tricking a user into opening a malicious XML file in Apache Cayenne Modeler.

- **Severity:** High 8.1 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 22 Aug 2018
- **Updated:** 16 Sep 2024
- **Also known as:** GHSA-85hw-w436-c725

## What is CVE-2018-11758?

CVE-2018-11758 is a high-severity vulnerability in Apache Cayenne, published on 22 Aug 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-611 (Improper Restriction of XML External Entity Reference)

## Which versions are affected by CVE-2018-11758?

4 open source packages ship an affected version, including org.apache.cayenne:cayenne-parent. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.cayenne:cayenne-parent` | Maven | All versions | 3.1.3 |
| `org.apache.cayenne:cayenne-parent` | Maven | All versions | 3.1.3 |
| `org.apache.cayenne:cayenne-parent` | Maven | From 4.0 | 4.1 |
| `org.apache.cayenne:cayenne-parent` | Maven | From 4.0 | 4.1 |

Products: Apache Cayenne.

## How do I fix CVE-2018-11758?

Upgrade org.apache.cayenne:cayenne-parent to a fixed version for your release line: 3.1.3 or 4.1.

## Is CVE-2018-11758 being exploited?

There is no known exploitation of CVE-2018-11758 in the wild and no public exploit code.

## Other vulnerabilities in Apache Cayenne

- [CVE-2022-24289](https://insights.sbomify.com/CVE-2022-24289/): Deserialization of untrusted data in the Hessian Component of Apache Cayenne 4.1 with older Java versions (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-11758 and fix it if it is affected.

What it is: CVE-2018-11758 is a high-severity vulnerability in Apache Cayenne, published on 22 Aug 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2018-11758 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.cayenne:cayenne-parent (Maven): affected all versions; fixed in 3.1.3
- org.apache.cayenne:cayenne-parent (Maven): affected all versions; fixed in 3.1.3
- org.apache.cayenne:cayenne-parent (Maven): affected from 4.0; fixed in 4.1
- org.apache.cayenne:cayenne-parent (Maven): affected from 4.0; fixed in 4.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2018-11758/ (Markdown: https://insights.sbomify.com/CVE-2018-11758/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2018-11758
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2018-11758
- OSV: https://osv.dev/vulnerability/CVE-2018-11758

---
From sbomify Insights: https://insights.sbomify.com/CVE-2018-11758/
Summaries are generated and may contain mistakes; the official description above is the record.
