XXE vulnerability in Jenkins Mercurial PluginGHSA-x58r-wxc3-7pqr
MEDIUMFix: jenkinsci/mercurial-plugin@84af58bGHSA-x58r-wxc3-7pqr is a medium-severity (CVSS 6.5) vulnerability in org.jenkins-ci.plugins:mercurial. A fix is available for org.jenkins-ci.plugins:mercurial — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.jenkins-ci.plugins:mercurial☕org.jenkins-ci.plugins:mercurial☕org.jenkins-ci.plugins:mercurial☕org.jenkins-ci.plugins:mercurialReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Jenkins Mercurial Plugin prior to 2.12, 2.10.1, 2.9.1, and 2.8.1 does not configure its XML changelog parser to prevent XML external entity (XXE) attacks.
This allows attackers able to control an agent process to have Jenkins parse a crafted changelog file that uses external entities for extraction of secrets from the Jenkins controller or server-side request forgery.
Mercurial Plugin 2.12, 2.10.1, 2.9.1, and 2.8.1 disables external entity resolution for its XML parser.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.jenkins-ci.plugins:mercurial | ≥ 2.11&&< 2.12 | 2.12org.jenkins-ci.plugins:mercurial:2.12 |
| ☕Maven | org.jenkins-ci.plugins:mercurial | ≥ 2.10&&< 2.10.1 | 2.10.1org.jenkins-ci.plugins:mercurial:2.10.1 |
| ☕Maven | org.jenkins-ci.plugins:mercurial | ≥ 2.9&&< 2.9.1 | 2.9.1org.jenkins-ci.plugins:mercurial:2.9.1 |
| ☕Maven | org.jenkins-ci.plugins:mercurial | all versions | 2.8.1org.jenkins-ci.plugins:mercurial:2.8.1 |
Affected Products
mercurialjenkinsDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.jenkins-ci.plugins:mercurial, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.jenkins-ci.plugins:mercurial to 2.12 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-x58r-wxc3-7pqr is resolved across your whole dependency graph.
Workarounds
Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update as soon as possible.Source: Red Hat security advisory for GHSA-x58r-wxc3-7pqr (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat OpenShift Container Platform 3.11 | jenkins-2-plugins-0:3.11.1612862361-1.el7 | RHSA-2021:0637 |
| Red Hat OpenShift Container Platform 4.4 | jenkins-2-plugins-0:4.4.1611203637-1.el7 | RHSA-2021:0282 |
| Red Hat OpenShift Container Platform 4.5 | jenkins-2-plugins-0:4.5.1610108899-1.el7 | RHSA-2021:0034 |
| Red Hat OpenShift Container Platform 4.6 | jenkins-2-plugins-0:4.6.1608634578-1.el7 | RHSA-2021:0038 |
Frequently Asked Questions
Is GHSA-x58r-wxc3-7pqr in your dependencies?
Find it across Maven, including transitive dependencies.