Miggo Logo

CVE-2021-21682: Improper handling of equivalent directory names on Windows in Jenkins

6.3

CVSS Score
3.1

Basic Information

EPSS Score
0.74395%
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:L/I:L/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.jenkins-ci.main:jenkins-coremaven>= 2.304, <= 2.3142.315
org.jenkins-ci.main:jenkins-coremaven<= 2.303.12.303.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from Jenkins' filename validation logic allowing trailing dots in entity names. The commit diff shows the vulnerability was patched by adding a trailing dot check in Jenkins.checkGoodName(). In vulnerable versions, this function did not include the 'endsWith(".")' validation, making it the root cause. The function is directly responsible for validating entity names and its lack of trailing dot handling created the path equivalence vulnerability on Windows systems.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

J*nkins stor*s jo*s *n* ot**r *ntiti*s on *isk usin* t**ir n*m* s*own on t** UI *s *il* *n* *ol**r n*m*s. On Win*ows, w**n sp**i*yin* * *il* or *ol**r wit* * tr*ilin* *ot ***r**t*r (`*x*mpl*.`), t** *il* or *ol**r will ** tr**t** *s i* t**t ***r**t*

Reasoning

T** vuln*r**ility st*ms *rom J*nkins' `*il*n*m*` v*li**tion lo*i* *llowin* tr*ilin* *ots in *ntity n*m*s. T** *ommit *i** s*ows t** vuln*r**ility w*s p*t**** *y ***in* * tr*ilin* *ot ****k in `J*nkins.****k*oo*N*m*()`. In vuln*r**l* v*rsions, t*is *u