Miggo Logo

CVE-2023-37460: Arbitrary File Creation in AbstractUnArchiver

8.1

CVSS Score
3.1

Basic Information

EPSS Score
0.97023%
Published
7/25/2023
Updated
11/5/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.codehaus.plexus:plexus-archivermaven< 4.8.04.8.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key interactions: 1) FileUtils.resolveFile()'s handling of broken symlinks via getCanonicalFile() returns the symlink path instead of resolving to non-existent targets, bypassing directory containment checks. 2) Files.newOutputStream() follows symlinks by default, writing to the unresolved target path. The combination allows creating files outside the extraction directory when a pre-existing symlink exists. The patch adds explicit symlink checks and changes the write mechanism, confirming these functions' roles in the vulnerability.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry Usin* **str**tUn*r**iv*r *or *xtr**tin* *n *r**iv* mi**t l*** to *n *r*itr*ry *il* *r**tion *n* possi*ly r*mot* *o** *x**ution. ### **s*ription W**n *xtr**tin* *n *r**iv* wit* *n *ntry t**t *lr***y *xists in t** **stin*tion *ir**tory *s

Reasoning

T** vuln*r**ility st*ms *rom two k*y int*r**tions: *) *il*Utils.r*solv**il*()'s **n*lin* o* *rok*n symlinks vi* **t**noni**l*il*() r*turns t** symlink p*t* inst*** o* r*solvin* to non-*xist*nt t*r**ts, *yp*ssin* *ir**tory *ont*inm*nt ****ks. *) *il*s