CVE-2021-43795
Path Traversal in com.linecorp.armeria:armeria
描述
### 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. ```java 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](https://github.com/line/armeria) * Chat with us at [Slack](https://armeria.dev/s/slack) ### Credits This vulnerability was originally reported by Abdallah Zaher ([elcayser-0x0a](https://hackerone.com/elcayser-0x0a?type=user)).
如何修補 CVE-2021-43795
要修補 CVE-2021-43795,請將受影響套件升級到下列已修補版本。
- —升級至 1.13.4 或更新版本
CVE-2021-43795 正在被利用嗎?
低 — EPSS 為 1.6%,目前沒有觀察到大規模利用活動。
受影響套件(1)
- >= 1.12.0, < 1.13.4
CVSS 分數
| 來源 |
|---|