Miggo Logo

CVE-2021-21698: Path traversal vulnerability in Jenkins Subversion Plugin allows reading arbitrary files

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.75653%
Published
5/24/2022
Updated
12/18/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.jenkins-ci.plugins:subversionmaven<= 2.15.02.15.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the lack of path validation in the getKeyFile method before version 2.15.1. The commit diff shows a security check was added to this method to prohibit directory separator characters in the 'id' parameter. Since this method constructs the key file path using Jenkins' root directory + 'subversion-credentials' + untrusted 'id' input, the absence of validation in vulnerable versions allowed path traversal attacks. The direct correlation between the patch location and vulnerability description confirms this function's role in the security flaw.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

Su*v*rsion Plu*in *.**.* *n* **rli*r *o*s not r*stri*t t** n*m* o* * *il* w**n lookin* up * su*v*rsion k*y *il* on t** *ontroll*r *rom *n ***nt. T*is *llows *tt**k*rs **l* to *ontrol ***nt pro**ss*s to r*** *r*itr*ry *il*s on t** J*nkins *ontroll*r

Reasoning

T** vuln*r**ility st*ms *rom t** l**k o* p*t* v*li**tion in t** `**tK*y*il*` m*t*o* ***or* v*rsion *.**.*. T** *ommit *i** s*ows * s**urity ****k w*s ***** to t*is m*t*o* to pro*i*it *ir**tory s*p*r*tor ***r**t*rs in t** 'i*' p*r*m*t*r. Sin** t*is m*