# CVE-2024-46984: Gematik Referenzvalidator has an XXE vulnerability that can lead to a Server Side Request Forgery attack

> Attackers can exploit insecure XML parsing defaults to trigger Server Side Request Forgery, potentially accessing internal network resources.

- **Severity:** High 8.6 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Sep 2024
- **Updated:** 20 Sep 2024
- **Also known as:** GHSA-68j8-fp38-p48q

## What is CVE-2024-46984?

CVE-2024-46984 is a high-severity vulnerability in gematik app-referencevalidator, published on 19 Sep 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The reference validator is a tool to perform advanced validation of FHIR resources for TI applications and interoperability standards. The profile location routine in the referencevalidator commons package is vulnerable to `XML External Entities` attack due to insecure defaults of the used Woodstox WstxInputFactory. A malicious XML resource can lead to network requests issued by referencevalidator and thus to a `Server Side Request Forgery` attack. The vulnerability impacts applications which use referencevalidator to process XML resources from untrusted sources. The problem has been patched with the 2.5.1 version of the referencevalidator. Users are strongly recommended to update to this version or a more recent one. A pre-processing or manual analysis of input XML resources on existence of DTD definitions or external entities can mitigate the problem.

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

## Which versions are affected by CVE-2024-46984?

2 open source packages ship an affected version, including de.gematik.refv.commons:commons. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `de.gematik.refv.commons:commons` | Maven | All versions | 2.5.1 |
| `de.gematik.refv.commons:commons` | Maven | All versions | 2.5.1 |

Products: Gematik Reference Validator.

## How do I fix CVE-2024-46984?

Upgrade de.gematik.refv.commons:commons to 2.5.1 or later.

## Is CVE-2024-46984 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-46984 and fix it if it is affected.

What it is: CVE-2024-46984 is a high-severity vulnerability in gematik app-referencevalidator, published on 19 Sep 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-46984 in the wild and no public exploit code.

Affected packages and fixed versions:
- de.gematik.refv.commons:commons (Maven): affected all versions; fixed in 2.5.1
- de.gematik.refv.commons:commons (Maven): affected all versions; fixed in 2.5.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-2024-46984/ (Markdown: https://insights.sbomify.com/CVE-2024-46984/index.md)
```

## Sources

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

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