CVE-2025-53103: Junit platform reporting Junit-platform-reporting Can Leak Git Credentials Vulnerability

MODERATE
Advisory Identifier: GHSA-m43g-m425-p68x
CVSS 5.8
CWE-312
Published
Advisory Summary

CVE-2025-53103 is a MODERATE (CVSS 5.8) junit-platform-reporting can leak git credentials vulnerability (CWE-312: Cleartext Storage of Sensitive Information) affecting Junit platform reporting libraries in the Maven ecosystem. The issue involves junit-platform-reporting can leak git credentials through its opentestreportgeneratinglistener. Remediation is available by upgrading affected packages to version 5.13.2.

CVE-2025-53103 at a Glance

CVE Identifier CVE-2025-53103
GHSA Identifier GHSA-m43g-m425-p68x
Severity MODERATE
CVSS v3.1 Base Score 5.8
CWE Classification CWE-312: Cleartext Storage of Sensitive Information
Affected Product Junit platform reporting
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.8

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

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
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-2025-53103

To remediate this vulnerability, upgrade all affected Junit platform reporting 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.junit.platform:junit-platform-reporting fixed: 5.13.2
<dependency>
    <groupId>org.junit.platform</groupId>
    <artifactId>junit-platform-reporting</artifactId>
    <version>5.13.2</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.junit.platform

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.junit.platform

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

Note: The mvn dependency:tree -Dincludes=org.junit.platform 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-312: Cleartext Storage of Sensitive Information, where the product stores sensitive information in cleartext within a resource that might be accessible to another control sphere. In Junit platform reporting, 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

### Summary This vulnerability affects JUnit's support for writing Open Test Reporting XML files which is an opt-in feature of `junit-platform-reporting`. If a repository is cloned using a GitHub token or other credentials in its URL, for example: ```bash git clone https://${GH_APP}:${GH_TOKEN}@github.com/example/example.git ``` The credentials are captured by `OpenTestReportGeneratingListener` which produces (trimmed for brevity): ```xml <infrastructure> <git:repository originUrl="https://username:token@github.com/example/example.git" /> </infrastructure> ``` ### Details https://github.com/junit-team/junit5/blob/6b7764dac92fd35cb348152d1b37f8726875a4e0/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListener.java#L183 I think this should be configurable in some way to exclude select git information or exclude it entirely. ### PoC 1. Clone a repo using a GitHub token as shown above. 2. Enable the listener `junit.platform.reporting.open.xml.enabled=true` 3. Observe report captures credentials ### Impact Depending on the level of access of the token, it can be nothing, limited, or everything. If these test reports are published or stored anywhere public, then there is the possibility that a rouge attacker can steal the token and perform elevated actions by impersonating the user or app. ### Resolution JUnit 5.13.2 and later replace credentials in the URL with `***`. Moreover, including any Git metadata in the XML output is now an opt-in feature that can be enabled via the new `junit.platform.reporting.open.xml.git.enabled=true` configuration parameter but is not included by default.

CVE-2025-53103 Affected Junit platform reporting Versions

1 component(s)
Fixed Versions:
5.13.2
Product / Package Ecosystem Affected Versions Fixed Version
org.junit.platform:junit-platform-reporting
Maven
≥ 5.12.0
< 5.13.2
5.13.2

References

Frequently Asked Questions

What is CVE-2025-53103?
CVE-2025-53103 is a security vulnerability in Junit platform reporting involving junit-platform-reporting can leak Git credentials through its OpenTestReportGeneratingListener under CWE-312: Cleartext Storage of Sensitive Information.
Which Junit platform reporting versions are affected?
Affected versions include releases prior to 5.13.2 across affected packages: org.junit.platform:junit-platform-reporting.
What version fixes CVE-2025-53103?
Upgrading to 5.13.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is junit-platform-reporting affected?
Yes, org.junit.platform:junit-platform-reporting is affected in releases prior to 5.13.2. Upgrade your dependency to 5.13.2 or later.
What is the CVSS score of CVE-2025-53103?
CVE-2025-53103 has a CVSS v3.1 base score of 5.8 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2025-53103?
CVE-2025-53103 is classified under CWE-312: Cleartext Storage of Sensitive Information (The product stores sensitive information in cleartext within a resource that might be accessible to another control sphere.).
How can I check Maven dependencies for CVE-2025-53103?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.junit.platform'. 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-m43g-m425-p68x",
  "modified" : "2025-07-01T22:59:43Z",
  "published" : "2025-07-01T22:59:43Z",
  "aliases" : [ "CVE-2025-53103" ],
  "summary" : "junit-platform-reporting can leak Git credentials through its OpenTestReportGeneratingListener ",
  "details" : "### Summary\n\nThis vulnerability affects JUnit's support for writing Open Test Reporting XML files which is an opt-in feature of `junit-platform-reporting`.\n\nIf a repository is cloned using a GitHub token or other credentials in its URL, for example:\n\n```bash\ngit clone https://${GH_APP}:${GH_TOKEN}@github.com/example/example.git\n```\n\nThe credentials are captured by `OpenTestReportGeneratingListener` which produces (trimmed for brevity):\n\n```xml\n<infrastructure>\n    <git:repository originUrl=\"https://username:token@github.com/example/example.git\" />\n</infrastructure>\n```\n\n### Details\n\nhttps://github.com/junit-team/junit5/blob/6b7764dac92fd35cb348152d1b37f8726875a4e0/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListener.java#L183\n\nI think this should be configurable in some way to exclude select git information or exclude it entirely.\n\n### PoC\n\n1. Clone a repo using a GitHub token as shown above.\n2. Enable the listener `junit.platform.reporting.open.xml.enabled=true`\n3. Observe report captures credentials\n\n### Impact\n\nDepending on the level of access of the token, it can be nothing, limited, or everything.\n\nIf these test reports are published or stored anywhere public, then there is the possibility that a rouge attacker can steal the token and perform elevated actions by impersonating the user or app.\n\n### Resolution\n\nJUnit 5.13.2 and later replace credentials in the URL with `***`. Moreover, including any Git metadata in the XML output is now an opt-in feature that can be enabled via the new `junit.platform.reporting.open.xml.git.enabled=true` configuration parameter but is not included by default.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.junit.platform:junit-platform-reporting"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.12.0"
      }, {
        "fixed" : "5.13.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.13.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/junit-team/junit-framework/security/advisories/GHSA-m43g-m425-p68x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-53103"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/junit-team/junit-framework/commit/d4fc834c8c1c0b3168cd030c13551d1d041f51bc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/junit-team/junit-framework"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/junit-team/junit-framework/blob/6b7764dac92fd35cb348152d1b37f8726875a4e0/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListener.java#L183"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-312" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-01T22:59:43Z",
    "nvd_published_at" : "2025-07-01T18:15:25Z"
  }
}