Miggo Logo

CVE-2020-2305:
XXE vulnerability in Jenkins Mercurial Plugin

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.66869%
Published
5/24/2022
Updated
12/14/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

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

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from insecure XML parsing in the MercurialChangeLogParser class. The pre-patch implementation used Digester2 (from Apache Commons Digester) to parse XML changelogs without disabling external entity resolution. The commit diff shows a replacement of Digester with secure XMLUtils.parse() which explicitly disables XXE. The parse method was the entry point for XML processing and lacked security configurations like setFeature(XMLConstants.FEATURE_SECURE_PROCESSING) or setExpandEntityReferences(false), making it vulnerable to XXE injection.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

J*nkins M*r*uri*l Plu*in prior to *.**, *.**.*, *.*.*, *n* *.*.* *o*s not *on*i*ur* its XML ***n**lo* p*rs*r to pr*v*nt XML *xt*rn*l *ntity (XX*) *tt**ks. T*is *llows *tt**k*rs **l* to *ontrol *n ***nt pro**ss to **v* J*nkins p*rs* * *r**t** ***n**l

Reasoning

T** vuln*r**ility st*ms *rom ins**ur* XML p*rsin* in t** M*r*uri*l***n**Lo*P*rs*r *l*ss. T** pr*-p*t** impl*m*nt*tion us** *i**st*r* (*rom *p**** *ommons *i**st*r) to p*rs* XML ***n**lo*s wit*out *is**lin* *xt*rn*l *ntity r*solution. T** *ommit *i**