Skip to content
XSS Advisory Beginner CVE-2023-35145

GHSL-2023-095: Cross-Site Scripting (XSS) in Jenkins Sonargraph - CVE-2023-35145

The Jenkins Sonargraph integration plugin reflected user input in HTML responses without proper escaping, allowing an attacker to inject scripts. An attacker could trick a victim into clicking a crafted link, leading to cross-site scripting and potentially remote code execution if the victim is an administrator.

Alvaro Muñoz Follow

Originally disclosed on GitHub Security Lab

Multiple reflected Cross-Site Scripting (XSS) were found in the Jenkins Sonargraph integration plugin

pwntester, on GitHub Security Lab

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 plugin used an XML escaping function that does not encode single or double quotes, making it unsafe for HTML attribute contexts.

Impact

This issue may lead to Cross-Site Scripting and if targeted to an administrator, it can be scaled into Remote Code Execution (RCE).

What the attacker needed

Victim clicks a link; attacker can create a project and file; victim is a Jenkins user

How it was found

  1. Create a project called test
  2. Build it at least once so that the associated workspace is created
  3. In the workspace, create a file called foo'onclick='alert()
  4. Send the crafted link to the victim

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.

Cross-site scripting (XSS) is a flaw where a website shows user input without cleaning it, so an attacker can make the site run their own JavaScript. Here, the plugin put a URL parameter into a web page without properly escaping quotes, so an attacker could break out of an HTML attribute and run code. If an administrator clicks the malicious link, the attacker could take over the Jenkins server.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Alvaro Muñoz

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.