7.5high
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in com.linecorp.armeria:armeria
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.71% (higher than 78% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-8fp4-rp6c-5gcv
Description
Armeria is an open source microservice framework. In affected versions an attacker can access an Armeria server's local file system beyond its restricted directory by sending an HTTP request whose path contains `%2F` (encoded `/`), such as `/files/..%2Fsecrets.txt`, bypassing Armeria's path validation logic. Armeria 1.13.4 or above contains the hardened path validation logic that handles `%2F` properly. This vulnerability can be worked around by inserting a decorator that performs an additional validation on the request path.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| line armeria | < 1.13.4 | CVE List |
| com.linecorp.armeria:armeria (Maven) | from 1.12.0 before 1.13.4 | GitHub Advisory Database |
| linecorp armeria | before 1.13.4 | NVD |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
Classification
What each source says
CVE List
Armeria is an open source microservice framework. In affected versions an attacker can access an Armeria server's local file system beyond its restricted directory by sending an HTTP request whose path contains `%2F` (encoded `/`), such as `/files/..%2Fsecrets.txt`, bypassing Armeria's path validation logic. Armeria 1.13.4 or above contains the hardened path validation logic that handles `%2F` properly. This vulnerability can be worked around by inserting a decorator that performs an additional validation on the request path.
GitHub Advisory Database
Impact
An attacker can access an Armeria server's local file system beyond its restricted directory by sending an HTTP request whose path contains %2F (encoded /), such as /files/..%2Fsecrets.txt, bypassing Armeria's path validation logic.
Patches
Armeria 1.13.4 or above contains the hardened path validation logic that handles %2F properly.
Workarounds
This vulnerability can be worked around by inserting a decorator that performs an additional validation on the request path, e.g.
Server
.builder()
.serviceUnder(
"/files",
FileService
.of(...)
.decorate((delegate, ctx, req) -> {
String path = req.headers().path();
if (path.contains("%2f") || path.contains("%2F")) {
return HttpResponse.of(HttpStatus.BAD_REQUEST);
}
return delegate.serve(ctx, req);
})
)
.build()
For more information
If you have any questions or comments about this advisory:
- Open an issue in line/armeria
- Chat with us at Slack
Credits
This vulnerability was originally reported by Abdallah Zaher (elcayser-0x0a).
NVD (es)
Armeria es un framework de microservicios de código abierto. En las versiones afectadas, un atacante puede acceder al sistema de archivos local de un servidor de Armeria más allá de su directorio restringido mediante el envío de una petición HTTP cuya ruta contenga "%2F" (codificado "/"), como "/files/..%2Fsecrets.txt", omitiendo la lógica de comprobación de rutas de Armeria. Armeria versión 1.13.4 o superior, contiene una lógica de comprobación de rutas reforzada que maneja "%2F" apropiadamente. Esta vulnerabilidad puede solucionarse al insertar un decorador que lleve a cabo una comprobación adicional en la ruta de petición
References
| https://github.com/line/armeria/security/advisories/GHSA-8fp4-rp6c-5gcv | third-party-advisory, web | |
| https://github.com/line/armeria/pull/3855 | third-party-advisory, web | |
| https://github.com/line/armeria/commit/e2697a575e9df6692b423e02d731f293c1313284 | patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-43795 | advisory | |
| https://github.com/line/armeria | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-43795 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8fp4-rp6c-5gcv changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-43795 changed 2026-06-17 | Public domain |