CVE-2021-21606: Arbitrary file existence check in file fingerprints in Jenkins
4.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.24895%
CWE
Published
5/24/2022
Updated
12/14/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| org.jenkins-ci.main:jenkins-core | maven | < 2.263.2 | 2.263.2 |
| org.jenkins-ci.main:jenkins-core | maven | >= 2.264, <= 2.274 | 2.275 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two key issues: 1) FileFingerprintStorage.load() lacked validation of fingerprint ID format before building filesystem paths, enabling directory traversal. 2) FingerprintMap.toByteArray() used custom hex parsing that didn't enforce proper MD5 format. The commit fixes show the vulnerability was addressed by adding hex validation (Util.fromHexString) in both the load method and fingerprint creation path. The test cases demonstrate how unvalidated IDs could be manipulated to access files outside the intended directory structure.