CVE-2022-25174: Improper Neutralization of Special Elements used in an OS Command in Jenkins Pipeline: Shared Groovy Libraries Plugin
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.82431%
CWE
Published
2/16/2022
Updated
12/22/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.jenkins-ci.plugins.workflow:workflow-cps-global-lib | maven | >= 544.vff04fa68714d, < 561.va | 561.va |
org.jenkins-ci.plugins.workflow:workflow-cps-global-lib | maven | >= 2.19, < 2.21.1 | 2.21.1 |
org.jenkins-ci.plugins.workflow:workflow-cps-global-lib | maven | < 2.18.1 | 2.18.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from directory collision in SCM checkouts. The commit diff shows the fix introduced hashed directory names (directoryNameFor
) based on SCM source+metadata. The original code in LibraryAdder.retrieve
used unsanitized library names to create paths, and LibraryRecord
stored no unique directory identifiers. This allowed attackers to poison shared directories via malicious SCMs. The functions handling directory path construction without proper uniqueness mechanisms are the root cause.