GHSA-frvj-cfq4-3228
HIGHPath traversal in Reposilite javadoc file expansion (arbitrary file creation/overwrite) (`GHSL-2024-073`)
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Blast Radius
com.reposilite:reposilite-backendReal-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
Summary
Reposilite v3.5.10 is affected by an Arbitrary File Upload vulnerability via path traversal in expanding of Javadoc archives.
Details
Reposilite provides support for JavaDocs files, which are archives that contain documentation for artifacts. Specifically, JavadocEndpoints.kt controller allows to expand the javadoc archive into the server's file system and return its content. The problem is in the way how the archives are expanded, specifically how the new filename is created:
JavadocContainerService.kt#L127-L136
jarFile.entries().asSequence().forEach { file ->
if (file.isDirectory) {
return@forEach
}
val path = Paths.get(javadocUnpackPath.toString() + "/" + file.name)
path.parent?.also { parent -> Files.createDirectories(parent) }
jarFile.getInputStream(file).copyToAndClose(path.outputStream())
}.asSuccess<Unit, ErrorResponse>()
The file.name taken from the archive can contain path traversal characters, such as '/../../../anything.txt', so the resulting extraction path can be outside the target directory.
Impact
If the archive is taken from an untrusted source, such as Maven Central or JitPack for example, an attacker can craft a special archive to overwrite any local file on Reposilite instance. This could lead to remote code execution, for example by placing a new plugin into the '$workspace$/plugins' directory. Alternatively, an attacker can overwrite the content of any other package.
Note that the attacker can use its own malicious package from Maven Central to overwrite any other package on Reposilite.
Steps to reproduce
- Create a malicious javadoc archive that contains filenames with path traversal characters:
zip test-1.0-javadoc.jar ../../../../../../../../tmp/evil.txt index.html
Make sure that ../../../../../../../../tmp/evil.txt and index.html files exist on the system where you create this archive.
-
Publish this archive to the repository which Reposilite is mirroring, such as Maven Central or JitPack. For the test purposes, I used my own server that imitates the upstream maven repository: http://artsploit.com/maven/com/artsploit/reposilite-zipslip/1.0/reposilite-zipslip-1.0-javadoc.jar
-
Start Reposilite with 'releases' repository mirroring to 'http://artsploit.com/maven/'
-
Now, if the attacker send the request to http://localhost:8080/javadoc/releases/com/artsploit/reposilite-zipslip/1.0, the aforementioned archive will be obtained from the http://artsploit.com/maven/com/artsploit/reposilite-zipslip/1.0/reposilite-zipslip-1.0-javadoc.jar address and its 'evil.txt' file will be expanded to '$workspace$/tmp/evil.txt'. Note that to perform this action, an attacker does not need to provide any credentials, as fetching from the mirrored repository does not require authentication.
-
Confirm that '$workspace$/tmp/evil.txt' is created on the server where Reposilite is running.
Remediation
Normalize (remove all occurrences of /../) the file.name variable before concatenating it with javadocUnpackPath. E.g.:
val path = Paths.get(javadocUnpackPath.toString() + "/" + Paths.get(file.name).normalize().toString())
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | com.reposilite:reposilite-backend | ≥ 3.3.0&&< 3.5.12 | 3.5.12 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for com.reposilite:reposilite-backend. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update com.reposilite:reposilite-backend to 3.5.12 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-frvj-cfq4-3228 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-frvj-cfq4-3228 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-frvj-cfq4-3228. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-frvj-cfq4-3228 in your dependencies?
O3 detects GHSA-frvj-cfq4-3228 across Maven dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.