Miggo Logo

CVE-2021-21681:
Password stored in plain text by Jenkins Nomad Plugin

5.5

CVSS Score
3.1

Basic Information

EPSS Score
0.29013%
Published
5/24/2022
Updated
10/27/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

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

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from two key aspects:

  1. NomadWorkerTemplate stored passwords as plaintext Strings (evidenced by field type change from String to Secret in the patch).
  2. NomadApi's buildDriverConfig method consumed these plaintext passwords without encryption (shown in the authConfig.put('password') line change from direct String access to Secret.getPlainText()).

The pre-patch version lacked Jenkins' Secret encryption mechanism for credential handling, making these functions directly responsible for the plaintext storage vulnerability. The commit diff confirms the security fix involved migrating to Secret type for password storage/retrieval.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

J*nkins Nom** Plu*in *.*.* *n* **rli*r stor*s t** p*sswor*s to *ut**nti**t* ***inst t** *o*k*r r**istry un*n*rypt** in t** *lo**l `*on*i*.xml` *il* on t** J*nkins *ontroll*r *s p*rt o* its work*r t*mpl*t*s *on*i*ur*tion. T**s* p*sswor*s **n ** vi*w*

Reasoning

T** vuln*r**ility st*mm** *rom two k*y *sp**ts: *. Nom**Work*rT*mpl*t* stor** p*sswor*s *s pl*int*xt Strin*s (*vi**n*** *y *i*l* typ* ***n** *rom Strin* to S**r*t in t** p*t**). *. Nom***pi's *uil**riv*r*on*i* m*t*o* *onsum** t**s* pl*int*xt p*sswor*