GHSA-8FP4-RP6C-5GCV
Vulnerability from github – Published: 2021-12-02 22:25 – Updated: 2021-12-02 21:28
VLAI?
Summary
Path Traversal in com.linecorp.armeria:armeria
Details
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).
Severity ?
7.5 (High)
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "com.linecorp.armeria:armeria"
},
"ranges": [
{
"events": [
{
"introduced": "1.12.0"
},
{
"fixed": "1.13.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-43795"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2021-12-02T21:28:29Z",
"nvd_published_at": "2021-12-02T18:15:00Z",
"severity": "HIGH"
},
"details": "### Impact\n\nAn attacker can access an Armeria server\u0027s local file system beyond its restricted directory by sending an HTTP request whose path contains `%2F` (encoded `/`), such as `/files/..%2Fsecrets.txt`, bypassing Armeria\u0027s path validation logic.\n\n### Patches\n\nArmeria 1.13.4 or above contains the hardened path validation logic that handles `%2F` properly. \n\n### Workarounds\n\nThis vulnerability can be worked around by inserting a decorator that performs an additional validation on the request path, e.g.\n\n```java\nServer\n .builder()\n .serviceUnder(\n \"/files\",\n FileService\n .of(...)\n .decorate((delegate, ctx, req) -\u003e {\n String path = req.headers().path();\n if (path.contains(\"%2f\") || path.contains(\"%2F\")) {\n return HttpResponse.of(HttpStatus.BAD_REQUEST);\n }\n return delegate.serve(ctx, req);\n })\n )\n .build()\n```\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [line/armeria](https://github.com/line/armeria)\n* Chat with us at [Slack](https://armeria.dev/s/slack)\n\n### Credits\n\nThis vulnerability was originally reported by Abdallah Zaher ([elcayser-0x0a](https://hackerone.com/elcayser-0x0a?type=user)).",
"id": "GHSA-8fp4-rp6c-5gcv",
"modified": "2021-12-02T21:28:29Z",
"published": "2021-12-02T22:25:54Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/line/armeria/security/advisories/GHSA-8fp4-rp6c-5gcv"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-43795"
},
{
"type": "WEB",
"url": "https://github.com/line/armeria/pull/3855"
},
{
"type": "WEB",
"url": "https://github.com/line/armeria/commit/e2697a575e9df6692b423e02d731f293c1313284"
},
{
"type": "PACKAGE",
"url": "https://github.com/line/armeria"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Path Traversal in com.linecorp.armeria:armeria"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…