GHSL-2023-097: Cross-Site Scripting (XSS) in maven-repository-plugin - CVE-2023-35143
The maven-repository-plugin generated HTML directory listings without escaping user-controlled names from Maven artifacts, allowing stored XSS. An attacker with Job/Configure permissions could inject a malicious artifact version and trick a victim into visiting a crafted URL, potentially leading to RCE if the victim is an administrator.
Originally disclosed on GitHub Security Lab
A stored Cross-Site Scripting (XSS) vulnerability was found in the maven-repository-plugin project.
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
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
Attacker has Job/Configure permissions; victim clicks a crafted link
How it was found
- Create a Maven project.
- Use an SCM source pointing to a project with a malicious pom.xml that includes an XSS payload in the artifact version.
- Build the project so that the artifacts are produced and stored in the workspace.
- Send the victim a link to the maven-repository directory listing for the crafted artifact.
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.
This plugin shows a list of files in a web page, but it puts file and folder names directly into the page without cleaning them. If an attacker can make a file with a name that contains code, that code runs in the browser of anyone who views the list. This is called cross-site scripting (XSS).
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.