Vulnerabilities in pkg:maven/de.gematik.refv.commons/commons

PACKAGE
Advisory Identifier: GHSA-68j8-fp38-p48q
Advisory Summary

CVE-2024-46984 is a HIGH (CVSS 8.6) gematik referenzvalidator has an xxe vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Commons libraries in the Maven ecosystem. The issue involves gematik referenzvalidator has an xxe vulnerability that can lead to a server side request forgery attack. Remediation is available by upgrading affected packages to version 2.5.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/de.gematik.refv.commons/commons

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/de.gematik.refv.commons/commons. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-68j8-fp38-p48q CVE-2024-46984 HIGH Gematik Referenzvalidator has an XXE vulnerability that can lead to a Server Side Request Forgery attack

CVE-2024-46984 at a Glance

CVE Identifier CVE-2024-46984
GHSA Identifier GHSA-68j8-fp38-p48q
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Commons
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.6

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:C/C:H/I:N/A:N).

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

How to Fix CVE-2024-46984

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

de.gematik.refv.commons:commons fixed: 2.5.1
<dependency>
    <groupId>de.gematik.refv.commons</groupId>
    <artifactId>commons</artifactId>
    <version>2.5.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=de.gematik.refv.commons

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=de.gematik.refv.commons

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

Note: The mvn dependency:tree -Dincludes=de.gematik.refv.commons 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 Commons, 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

### Impact The profile location routine in the referencevalidator commons package is vulnerable to [XML External Entities](https://owasp.org/www-project-top-ten/2017/A4_2017-XML_External_Entities_(XXE)) 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](https://owasp.org/www-community/attacks/Server_Side_Request_Forgery) attack. The vulnerability impacts applications which use referencevalidator to process XML resources from untrusted sources. ### Patches The problem has been patched with the [2.5.1 version](https://github.com/gematik/app-referencevalidator/releases/tag/2.5.1) of the referencevalidator. Users are strongly recommended to update to this version or a more recent one. ### Workarounds A pre-processing or manual analysis of input XML resources on existence of DTD definitions or external entities can mitigate the problem. ### References - [OWASP Top 10 XXE](https://owasp.org/www-project-top-ten/2017/A4_2017-XML_External_Entities_(XXE)#) - [Server Side Request Forgery](https://owasp.org/www-community/attacks/Server_Side_Request_Forgery) - [OWASP XML External Entity Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#transformerfactory)

CVE-2024-46984 Affected Commons Versions

1 component(s)
Fixed Versions:
2.5.1
Product / Package Ecosystem Affected Versions Fixed Version
de.gematik.refv.commons:commons
Maven
< 2.5.1
2.5.1

References

Frequently Asked Questions

What is CVE-2024-46984?
CVE-2024-46984 is a security vulnerability in Commons involving Gematik Referenzvalidator has an XXE vulnerability that can lead to a Server Side Request Forgery attack under CWE-611: Improper Restriction of XML External Entity Reference.
Which Commons versions are affected?
Affected versions include releases prior to 2.5.1 across affected packages: de.gematik.refv.commons:commons.
What version fixes CVE-2024-46984?
Upgrading to 2.5.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is commons affected?
Yes, de.gematik.refv.commons:commons is affected in releases prior to 2.5.1. Upgrade your dependency to 2.5.1 or later.
What is the CVSS score of CVE-2024-46984?
CVE-2024-46984 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2024-46984?
CVE-2024-46984 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-2024-46984?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=de.gematik.refv.commons'. 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-68j8-fp38-p48q",
  "modified" : "2024-09-20T14:52:32Z",
  "published" : "2024-09-19T14:49:40Z",
  "aliases" : [ "CVE-2024-46984" ],
  "summary" : "Gematik Referenzvalidator has an XXE vulnerability that can lead to a Server Side Request Forgery attack",
  "details" : "### Impact\nThe profile location routine in the referencevalidator commons package is vulnerable to [XML External Entities](https://owasp.org/www-project-top-ten/2017/A4_2017-XML_External_Entities_(XXE)) 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](https://owasp.org/www-community/attacks/Server_Side_Request_Forgery) attack.\n\nThe vulnerability impacts applications which use referencevalidator to process XML resources from untrusted sources. \n\n### Patches\nThe problem has been patched with the [2.5.1 version](https://github.com/gematik/app-referencevalidator/releases/tag/2.5.1) of the referencevalidator. Users are strongly recommended to update to this version or a more recent one. \n\n### Workarounds\nA pre-processing or manual analysis of input XML resources on existence of DTD definitions or external entities can mitigate the problem.\n\n### References\n- [OWASP Top 10 XXE](https://owasp.org/www-project-top-ten/2017/A4_2017-XML_External_Entities_(XXE)#)\n- [Server Side Request Forgery](https://owasp.org/www-community/attacks/Server_Side_Request_Forgery)\n- [OWASP XML External Entity Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#transformerfactory)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "de.gematik.refv.commons:commons"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.5.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/gematik/app-referencevalidator/security/advisories/GHSA-68j8-fp38-p48q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-46984"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gematik/app-referencevalidator/commit/d6d27613fab7a8dd08534946f29e0c51f319cad6"
  }, {
    "type" : "WEB",
    "url" : "https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#transformerfactory"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gematik/app-referencevalidator"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gematik/app-referencevalidator/releases/tag/2.5.1"
  }, {
    "type" : "WEB",
    "url" : "https://owasp.org/www-community/attacks/Server_Side_Request_Forgery"
  }, {
    "type" : "WEB",
    "url" : "https://owasp.org/www-project-top-ten/2017/A4_2017-XML_External_Entities_(XXE)"
  }, {
    "type" : "WEB",
    "url" : "https://owasp.org/www-project-top-ten/2017/A4_2017-XML_External_Entities_(XXE)#"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-19T14:49:40Z",
    "nvd_published_at" : "2024-09-19T23:15:12Z"
  }
}