Skip to content
XSS Advisory Intermediate CVE-2024-36115CVE-2024-36116CVE-2024-36117

GHSL-2024-072_GHSL-2024-074: Stored Cross-Site Scripting (XSS), Arbitrary File Upload, and Arbitrary File Read/Write via Path Traversal in Reposilite - CVE-2024-36115, CVE-2024-36116, CVE-2024-36117

Reposilite suffers from stored XSS, arbitrary file upload via path traversal in Javadoc archives, and arbitrary file read via path traversal in Javadoc serving. An attacker could steal admin credentials, overwrite files, or read sensitive files like the database.

Michael Stepankin Follow

Originally disclosed on GitHub Security Lab

Reposilite is affected by multiple high severity vulnerabilities, including Stored Cross-Site Scripting (XSS), Arbitrary File Upload, and Arbitrary File Read/Write via Path Traversal. The first Cross-Site Scripting vulnerability in artifact’s content allows unauthenticated users to steal the victim’s password from the…

artsploit, 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 application served user-uploaded content from the same origin as the admin interface, and it failed to properly sanitise file paths when extracting and serving Javadoc archives, allowing directory traversal.

Impact

An attacker could steal admin credentials, overwrite arbitrary files (potentially leading to remote code execution), and read sensitive files such as the database containing password hashes.

What the attacker needed

Reposilite instance with default settings; Victim (admin) visits a crafted link; Reposilite mirrors a third-party repository; Attacker can publish to that repository

The fix

The issues were fixed in version 3.5.12.

How it was found

  1. Start Reposilite with default settings and configure a repository to mirror a malicious Maven repository.
  2. As an authenticated user, navigate to a crafted artifact URL that contains JavaScript.
  3. The JavaScript executes in the admin origin and can read the token-secret from local storage.
  4. For file upload: create a Javadoc archive with filenames containing path traversal sequences.
  5. Publish the archive to a mirrored repository and trigger its expansion via a request to the Javadoc endpoint.
  6. For file read: send a GET request to the Javadoc raw endpoint with a path traversal sequence to read arbitrary files.

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.

Reposilite is a tool for managing software packages. It had three security holes: one let a malicious package run code in an admin's browser to steal their password; another let a specially crafted package write files anywhere on the server; and a third let attackers read any file on the server, including the password database. These were fixed in version 3.5.12.

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 Michael Stepankin

View all

16 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.