Vulnerabilities in pkg:maven/org.apache.maven.plugins/maven-archetype-plugin
PACKAGECVE-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.
pkg:maven/org.apache.maven.plugins/maven-archetype-plugin
Vulnerability advisories affecting package pkg:maven/org.apache.maven.plugins/maven-archetype-plugin. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-2qq7-fch2-phqf | CVE-2024-47197 | LOW | Maven Archetype Plugin: Maven Archetype integration-test may package local settings into the published artifact, possibly containing credentials |
CVE-2024-47197 at a Glance
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).
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.
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>3.3.0</version>
</dependency>
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
CVE-2024-47197 Affected Maven Archetype Plugin Versions
1 component(s)| 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?
Which Maven Archetype Plugin versions are affected?
What version fixes CVE-2024-47197?
Is maven-archetype-plugin affected?
What is the CVSS score of CVE-2024-47197?
What CWE is associated with CVE-2024-47197?
How can I check Maven dependencies for CVE-2024-47197?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}