CVE-2024-47197 Maven Archetype Plugin: Maven Archetype integration-test may package local settings into the published artifact, possibly containing credentials
Developers using Maven Archetype Plugin may inadvertently publish local credentials to remote repositories due to insecure storage of settings during integration tests.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-47197?
CVE-2024-47197 is a high-severity vulnerability in Apache Software Foundation Maven Archetype Plugin, published on 26 Sep 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Which versions are affected by CVE-2024-47197?
2 open source packages ship an affected version, including org.apache.maven.plugins:maven-archetype-plugin. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.maven.plugins:maven-archetype-plugin Maven | From 3.2.1 | 3.3.0 |
org.apache.maven.plugins:maven-archetype-plugin Maven | From 3.2.1 | 3.3.0 |
Linux distribution packages (1)
maven-archetype openSUSE:Tumbleweed | All versions | 3.3.0-1.1 |
Products include Apache Maven Archetype.
How do I fix CVE-2024-47197?
Upgrade org.apache.maven.plugins:maven-archetype-plugin to 3.3.0 or later.
Is CVE-2024-47197 being exploited?
There is no known exploitation of CVE-2024-47197 in the wild and no public exploit code.
Sources
Also known as GHSA-2qq7-fch2-phqf, openSUSE-SU-2024:14372-1.