CVE-2024-47197: Maven Archetype Plugin Maven Archetype Integration-test May Package Vulnerability

LOW
Advisory Identifier: GHSA-2qq7-fch2-phqf
CVSS 3.1
CWE-922 CWE-200
Published
Advisory Summary

CVE-2024-47197 is a LOW (CVSS 3.1) maven archetype integration-test may package vulnerability (CWE-922: Insecure Storage of Sensitive Information) affecting Maven Archetype Plugin libraries in the Maven ecosystem. The issue involves maven archetype integration-test may package local settings into the published artifact, possibly containing credentials. Remediation is available by upgrading affected packages to version 3.3.0.

CVE-2024-47197 at a Glance

CVE Identifier CVE-2024-47197
GHSA Identifier GHSA-2qq7-fch2-phqf
Severity LOW
CVSS v3.1 Base Score 3.1
CWE Classification CWE-922: Insecure Storage of Sensitive Information
Affected Product Maven Archetype Plugin
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 3.1

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

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

How to Fix CVE-2024-47197

To remediate this vulnerability, upgrade all affected Maven Archetype Plugin 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.maven.plugins:maven-archetype-plugin fixed: 3.3.0
<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-archetype-plugin</artifactId>
    <version>3.3.0</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.maven.plugins

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.apache.maven.plugins

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

Note: The mvn dependency:tree -Dincludes=org.apache.maven.plugins 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-922: Insecure Storage of Sensitive Information, where the product stores sensitive information without properly limiting read or write access by unauthorized actors. In Maven Archetype Plugin, 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

Exposure of Sensitive Information to an Unauthorized Actor, Insecure Storage of Sensitive Information vulnerability in Maven Archetype Plugin. This issue affects Maven Archetype Plugin: from 3.2.1 before 3.3.0. Users are recommended to upgrade to version 3.3.0, which fixes the issue. Archetype integration testing creates a file called ./target/classes/archetype-it/archetype-settings.xml This file contains all the content from the users ~/.m2/settings.xml file, which often contains information they do not want to publish. We expect that on many developer machines, this also contains credentials. When the user runs mvn verify again (without a mvn clean), this file becomes part of the final artifact. If a developer were to publish this into Maven Central or any other remote repository (whether as a release or a snapshot) their credentials would be published without them knowing.

CVE-2024-47197 Affected Maven Archetype Plugin Versions

1 component(s)
Fixed Versions:
3.3.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.maven.plugins:maven-archetype-plugin
Maven
≥ 3.2.1
< 3.3.0
3.3.0

References

Frequently Asked Questions

What is CVE-2024-47197?
CVE-2024-47197 is a security vulnerability in Maven Archetype Plugin involving Maven Archetype integration-test may package local settings into the published artifact, possibly containing credentials under CWE-922: Insecure Storage of Sensitive Information.
Which Maven Archetype Plugin versions are affected?
Affected versions include releases prior to 3.3.0 across affected packages: org.apache.maven.plugins:maven-archetype-plugin.
What version fixes CVE-2024-47197?
Upgrading to 3.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is maven-archetype-plugin affected?
Yes, org.apache.maven.plugins:maven-archetype-plugin is affected in releases prior to 3.3.0. Upgrade your dependency to 3.3.0 or later.
What is the CVSS score of CVE-2024-47197?
CVE-2024-47197 has a CVSS v3.1 base score of 3.1 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2024-47197?
CVE-2024-47197 is classified under CWE-922: Insecure Storage of Sensitive Information (The product stores sensitive information without properly limiting read or write access by unauthorized actors.).
How can I check Maven dependencies for CVE-2024-47197?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.maven.plugins'. 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-2qq7-fch2-phqf",
  "modified" : "2025-03-17T21:32:40Z",
  "published" : "2024-09-26T09:31:42Z",
  "aliases" : [ "CVE-2024-47197" ],
  "summary" : "Maven Archetype Plugin: Maven Archetype integration-test may package local settings into the published artifact, possibly containing credentials",
  "details" : "Exposure of Sensitive Information to an Unauthorized Actor, Insecure Storage of Sensitive Information vulnerability in Maven Archetype Plugin.\n\nThis issue affects Maven Archetype Plugin: from 3.2.1 before 3.3.0.\n\nUsers are recommended to upgrade to version 3.3.0, which fixes the issue.\n\nArchetype integration testing creates a file\ncalled ./target/classes/archetype-it/archetype-settings.xml\nThis file contains all the content from the users ~/.m2/settings.xml file,\nwhich often contains information they do not want to publish. We expect that on many developer machines, this also contains\ncredentials.\n\nWhen the user runs mvn verify again (without a mvn clean), this file becomes part of the final artifact.\n\nIf a developer were to publish this into Maven Central or any other remote repository (whether as a release or a snapshot) their credentials would be published without them knowing.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.maven.plugins:maven-archetype-plugin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.2.1"
      }, {
        "fixed" : "3.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-47197"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/maven-archetype/pull/188"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/maven-archetype/commit/484b6ab946f0d7ce557a3df28615d8c51e500054"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/maven-archetype"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/ARCHETYPE-657"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/ftg81np183wnyk0kg4ks95dvgxdrof96"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2024/09/26/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-922" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-26T18:25:13Z",
    "nvd_published_at" : "2024-09-26T08:15:06Z"
  }
}