Miggo Logo

CVE-2022-43407: CSRF protection for any URL can be bypassed in Jenkins Pipeline: Input Step Plugin

8.8

CVSS Score
3.1

Basic Information

EPSS Score
0.01075%
Published
10/19/2022
Updated
1/5/2024
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.jenkins-ci.plugins:pipeline-input-stepmaven< 456.vd8a456.vd8a_957db_5b_e9

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from two key points: 1) The InputStep.setId method allowed arbitrary characters in the 'id' parameter without validation, enabling malicious IDs. 2) The Jelly template used these raw IDs in form action URLs without encoding. The commit added ID validation (doCheckId) in InputStep.java and encoding in index.jelly, confirming these were the vulnerable points. The test cases explicitly validate() these fixes, reinforcing their role in the vulnerability.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

Pip*lin*: Input St*p Plu*in ***.v***_*_******** *n* **rli*r *o*s not r*stri*t or s*nitiz* t** option*lly sp**i*i** I* o* t** `input` st*p. T*is I* is us** *or t** URLs t**t pro**ss us*r int*r**tions *or t** *iv*n `input` st*p (pro**** or **ort) *n* i

Reasoning

T** vuln*r**ility st*mm** *rom two k*y points: *) T** `InputSt*p.s*tI*` m*t*o* *llow** *r*itr*ry ***r**t*rs in t** 'i*' p*r*m*t*r wit*out v*li**tion, *n**lin* m*li*ious I*s. *) T** `J*lly` t*mpl*t* us** t**s* r*w I*s in *orm **tion URLs wit*out *n*o*