Skip to content
XXE Advisory Intermediate CVE-2019-10309

Jenkins Swarm Plugin XML external entities information disclosure vulnerability

The Jenkins Swarm plugin's UDP discovery response parser is vulnerable to XML external entity injection, allowing an attacker on the same network to read arbitrary files from Swarm client systems. An attacker can respond to discovery broadcasts with a crafted XML payload to exfiltrate file contents.

Peter Adkins Follow

Originally disclosed on Cisco Talos

Medium 6.1 View original

The Jenkins Self-Organizing Swarm Modules Plugin, version 3.14, contains a trivial XXE (XML External Entities) vulnerability inside of the getCandidateFromDatagramResponses() method. As a result of this issue, it is possible for an attacker on the same network as a Swarm client to read arbitrary files from the system…

Peter Adkins, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The XML parser used in getCandidateFromDatagramResponses() does not disable external entity resolution, allowing XXE.

Impact

An attacker on the same network could read arbitrary files from Swarm agent systems without authentication, though exfiltration may be limited for files containing certain characters.

What the attacker needed

Attacker on same network as Swarm agent; Swarm agent uses UDP broadcast discovery

The fix

The vulnerability was fixed by the vendor in a patched version; as a workaround, disable UDP broadcast discovery by explicitly specifying the Jenkins master.

How it was found

  1. Set up a fake Jenkins HTTP server that serves a malicious DTD and an exfiltration endpoint.
  2. Listen for UDP broadcast discovery requests from Swarm agents.
  3. Respond to each request with a crafted XML payload that references the external DTD.
  4. The Swarm agent parses the XML, resolves the external entities, and sends file contents to the attacker's server.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a Jenkins Swarm agent starts, it sends a broadcast message on the local network to find a Jenkins master. The plugin reads the XML reply without disabling external entities, a feature that lets XML pull in files from the machine. An attacker on the same network can send a malicious reply that makes the agent read local files and send their contents back.

What is XXE?

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.

More by Peter Adkins

View all

5 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

XML external entities (XXE)

The lesson behind this report.

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.