8.6high
Path traversal while serving Reposilite javadoc expanded files
- Severity
- 8.6high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 3.12% (higher than 88% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-82j3-hf72-7x93GHSA-w7c4-5w4f-jm3g
Description
Reposilite is an open source, lightweight and easy-to-use repository manager for Maven based artifacts in JVM ecosystem. Reposilite v3.5.10 is affected by an Arbitrary File Read vulnerability via path traversal while serving expanded javadoc files. Reposilite has addressed this issue in version 3.5.12. There are no known workarounds for this vulnerability. This issue was discovered and reported by the GitHub Security lab and is also tracked as GHSL-2024-074.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| dzikoysk reposilite | >= 3.3.0, < 3.5.12, from 3.3.0 before 3.5.12 | CVE List |
| com.reposilite:reposilite-backend (Maven) | from 3.3.0 before 3.5.12 | GitHub Advisory Database |
| reposilite reposilite | from 3.3.0 before 3.5.12 | NVD |
All scores
| GitHub_M | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L |
| GitHub | 8.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:L/SC:N/SI:N/SA:N |
| GitHub | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
Reposilite is an open source, lightweight and easy-to-use repository manager for Maven based artifacts in JVM ecosystem. Reposilite v3.5.10 is affected by an Arbitrary File Read vulnerability via path traversal while serving expanded javadoc files. Reposilite has addressed this issue in version 3.5.12. There are no known workarounds for this vulnerability. This issue was discovered and reported by the GitHub Security lab and is also tracked as GHSL-2024-074.
GitHub Advisory Database
Summary
Reposilite v3.5.10 is affected by an Arbitrary File Read vulnerability via path traversal while serving expanded javadoc files.
Details
The problem lies in the way how the expanded javadoc files are served. The GET /javadoc/{repository}/<gav>/raw/<resource> route uses the <resource> path parameter to find the file in the javadocUnpackPath directory and returns it's content to the user.
fun findRawJavadocResource(request: JavadocRawRequest): Result<JavadocRawResponse, ErrorResponse> =
with (request) {
mavenFacade.canAccessResource(accessToken, repository, gav)
.flatMap { javadocContainerService.loadContainer(accessToken, repository, gav) }
.filter({ Files.exists(it.javadocUnpackPath.resolve(resource.toString())) }, { notFound("Resource $resource not found") })
.map {
JavadocRawResponse(
contentType = supportedExtensions[resource.getExtension()] ?: ContentType.APPLICATION_OCTET_STREAM,
content = Files.newInputStream(it.javadocUnpackPath.resolve(resource.toString()))
)
}
}
In this case, the <resource> path parameter can contain path traversal characters such as /../../. Since the path is concatenated with the main directory, it opens the possibility to read files outside the javadocUnpackPath directory.
Impact
This issue may lead to Arbitrary File Read on the server. A potential attacker can read some sensitive file, such as reposilite.db, that contains the sqlite database used by Reposilite. This database contains the sensitive information used by Reposilite, including passwords and hashes of issued tokens. Also, the configuration.cdn file can be read, which contains other sensitive properties.
Steps to reproduce
- Start the Reposilite instance on http://localhost:8080/
- Find at least one javadoc file in the hosted repositories. For example, the default test workspace contains the
/releases/javadoc/1.0.0/javadoc-1.0.0-javadoc.jararchive that is suitable for our attack. - Send a GET request to http://127.0.0.1:8080/javadoc/releases/javadoc/1.0.0/raw/%2e%2e%5c%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2freposilite.db
When this request is processed on the server, Reposilite tries to unpack the
/repositories/releases/javadoc/1.0.0/javadoc-1.0.0-javadoc.jarfile into the/javadocs/releases/javadoc/1.0.0/.cache/unpackfolder. Then, it tries to read the../../../../../../reposilite.dbfile from this folder, which triggers the path traversal attack.
Remediation
Normalize (remove all occurrences of /../) the <resource> path parameter before using it when reading the file. For example:
content = Files.newInputStream(it.javadocUnpackPath.resolve(resource.toPath()))
Changing resource.toString() to resource.toPath() is enough here as the com.reposilite.storage.api.Location#toPath method normalizes the string internally.
GitHub Advisory Database
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-82j3-hf72-7x93. This link is maintained to preserve external references.
Original description
Reposilite is an open source, lightweight and easy-to-use repository manager for Maven based artifacts in JVM ecosystem. Reposilite v3.5.10 is affected by an Arbitrary File Read vulnerability via path traversal while serving expanded javadoc files. Reposilite has addressed this issue in version 3.5.12. There are no known workarounds for this vulnerability. This issue was discovered and reported by the GitHub Security lab and is also tracked as GHSL-2024-074.
NVD (es)
Reposilite es un administrador de repositorio de código abierto, liviano y fácil de usar para artefactos basados en Maven en el ecosistema JVM. Reposilite v3.5.10 se ve afectado por una vulnerabilidad de lectura arbitraria de archivos a través del recorrido de ruta mientras sirve archivos javadoc expandidos. Reposilite ha solucionado este problema en la versión 3.5.12. No se conocen workarounds para esta vulnerabilidad. Este problema fue descubierto e informado por el laboratorio de seguridad de GitHub y también se rastrea como GHSL-2024-074.
References
| https://github.com/dzikoysk/reposilite/releases/tag/3.5.12 | release-notes, web | |
| https://github.com/dzikoysk/reposilite/security/advisories/GHSA-82j3-hf72-7x93 | exploit, mitigation, vendor-advisory, web | |
| https://github.com/dzikoysk/reposilite/commit/e172ae4b539c822d0d6e04cf090713c7202a79d6 | patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2024-36117 | advisory | |
| https://github.com/dzikoysk/reposilite | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-36117 changed 2024-11-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-82j3-hf72-7x93 changed 2024-11-05 | CC-BY-4.0 |
| GitHub Advisory Database | GHSA-w7c4-5w4f-jm3g changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-36117 changed 2026-06-17 | Public domain |