{"id":"GHSA-375p-5qhx-8wq4","revision":null,"records":[{"revision":"9f8d97669e7d4b859ed4cf35ca9b2c70","observedAt":"2026-11-02T21:57:16.98+00:00","statement":{"source":"cve-program","id":"CVE-2026-118650","aliases":[],"title":"Echo: middleware.Static: `%2F`-encoded path bypasses route/group middleware guarding a statically-served path","description":"Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, a globally mounted middleware.Static instance can interpret an encoded request path differently from Echo's router because the router matches the still-encoded path while the static handler uses the decoded URL.Path. The advisory demonstrates an encoded slash resolving to a file under the static root through the global static middleware, but the source is internally inconsistent about whether a route or group guard protects the corresponding literal path in that global-mount configuration. This issue is fixed in 4.16.0 and 5.4.0.","state":0,"publishedAt":"2026-10-28T19:25:02.952+00:00","modifiedAt":"2026-11-02T20:40:36.53+00:00","affected":[{"ecosystem":"Vendor product","name":"echo","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"labstack\",\n                    \"product\": \"echo\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 5.0.0, < 5.4.0\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"< 4.16.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":"HIGH"}],"references":["https://github.com/labstack/echo/security/advisories/GHSA-375p-5qhx-8wq4","https://github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1","https://github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af","https://github.com/labstack/echo/releases/tag/v4.16.0","https://github.com/labstack/echo/releases/tag/v5.4.0"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-118650","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-118650","identifiers":["CVE-2026-118650"]},"retained":false,"historicalAffected":[]},{"revision":"6b5c5e5c75794884918c2a61d3bd7e80","observedAt":"2026-11-16T04:35:39.594+00:00","statement":{"source":"euvd","id":"EUVD-2026-112404","aliases":["CVE-2026-118650","GHSA-375p-5qhx-8wq4"],"title":"Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, a globally mounted middleware.Static instance can interpret an encoded request path differently from Echo's router because the router matches the still-encoded path while the static han…","description":"Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, a globally mounted middleware.Static instance can interpret an encoded request path differently from Echo's router because the router matches the still-encoded path while the static handler uses the decoded URL.Path. The advisory demonstrates an encoded slash resolving to a file under the static root through the global static middleware, but the source is internally inconsistent about whether a route or group guard protects the corresponding literal path in that global-mount configuration. This issue is fixed in 4.16.0 and 5.4.0.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":null}],"references":["https://github.com/labstack/echo/security/advisories/GHSA-375p-5qhx-8wq4","https://github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1","https://github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af","https://github.com/labstack/echo/releases/tag/v4.16.0","https://github.com/labstack/echo/releases/tag/v5.4.0"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-112404","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Oct 28, 2026, 7:25:02 PM","dateUpdated":"Nov 2, 2026, 8:40:36 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-112404","identifiers":["EUVD-2026-112404","CVE-2026-118650","GHSA-375p-5qhx-8wq4"]},"retained":false,"historicalAffected":[]},{"revision":"7d4d109e467145e9a620ee71edbc0f5e","observedAt":"2026-11-03T22:59:08.68+00:00","statement":{"source":"nvd","id":"CVE-2026-118650","aliases":[],"title":"Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, a globally mounted middleware.Static instance can interpret an encoded request path differently from Echo's router because the router matches the still-encoded path while the static han…","description":"Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, a globally mounted middleware.Static instance can interpret an encoded request path differently from Echo's router because the router matches the still-encoded path while the static handler uses the decoded URL.Path. The advisory demonstrates an encoded slash resolving to a file under the static root through the global static middleware, but the source is internally inconsistent about whether a route or group guard protects the corresponding literal path in that global-mount configuration. This issue is fixed in 4.16.0 and 5.4.0.","state":0,"publishedAt":"2026-10-28T20:17:21.85+00:00","modifiedAt":"2026-11-02T21:17:27.4+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":"HIGH"}],"references":["https://github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1","https://github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af","https://github.com/labstack/echo/releases/tag/v4.16.0","https://github.com/labstack/echo/releases/tag/v5.4.0","https://github.com/labstack/echo/security/advisories/GHSA-375p-5qhx-8wq4"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-118650","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Undergoing Analysis","weaknesses":["CWE-177","CWE-863"],"productCriteria":[],"sourceDates":{"published":"2026-10-28T20:17:21.850","lastModified":"2026-11-02T21:17:27.400"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-118650","identifiers":["CVE-2026-118650"]},"retained":false,"historicalAffected":[]},{"revision":"ff564afb40794cab8ea99b6ffd036405","observedAt":"2026-11-05T23:38:32.248+00:00","statement":{"source":"osv","id":"GHSA-375p-5qhx-8wq4","aliases":["CVE-2026-118650","GO-2026-6873"],"title":"Echo's middleware.Static: `%2F`-encoded path bypasses route/group middleware guarding a statically-served path","description":"## Summary\n\nWhen `middleware.Static` is mounted globally (`e.Use(middleware.Static(...))`) and an application relies on a **route- or group-level middleware guard** to restrict a path that also falls under the served static root, a `%2F`-encoded request bypasses that guard while the file is still served. This is the same encoding/decoding mismatch fixed for `StaticFS`/`StaticDirectoryHandler` in CVE-2026-55677 / GHSA-vfp3-v2gw-7wfq, but the fix did not cover the `middleware.Static` path. In addition, the `StaticConfig.EnablePathUnescaping` docstring states the default configuration prevents exactly this bypass, which is inaccurate for the global-mount case.\n\n**This is not path traversal:** no file outside the static root is accessed. The served file lives inside the static root; the issue is that access-control expectations set by a route guard are inconsistent between the literal and `%2F`-encoded forms of the same path.\n\n## Details\n\nRoot cause — the router and the static handler disagree on how to interpret `%2F`:\n\n- The router matches routes on the **raw, still-encoded** path, so `GET /admin%2Fsecret.txt` does **not** match a `/admin/...` route or group; any middleware attached to that route/group is therefore skipped.\n- `middleware.Static` selects its path source in `middleware/static.go` (~L219): with a global `e.Use` mount there is no wildcard route, so it uses `c.Request().URL.Path`, which `net/http` has already **decoded** (`%2F` → `/`). It then `path.Clean`s (~L235) and `Open`s (~L259) `admin/secret.txt`, serving the file.\n\nNet effect: for the literal path the guard runs; for the `%2F`-encoded path the guard is skipped but the same file is served.\n\nRelevant code:\n- `middleware/static.go` ~L219 (`p := c.Request().URL.Path`), ~L235 (`path.Clean`), ~L259 (`currentFS.Open`)\n- `StaticConfig.EnablePathUnescaping` docstring (`static.go` ~L60-67) — claims the default prevents the `/admin%2fprivate.txt` → `/admin/*` guard bypass; this is not true for the global mount.\n\nRelationship to prior advisories:\n- **CVE-2026-55677 / GHSA-vfp3-v2gw-7wfq** (patched 5.2.0): same `%2F` router-vs-handler mismatch, but fixed for `StaticFS`/`StaticDirectoryHandler`. The `middleware.Static` path was not covered — this report is that gap.\n- **CVE-2026-25766 / GHSA-pgvm-wxw2-hrv9** (patched 5.0.3): a *different* issue (Windows backslash traversal **outside** the root). Referenced only to disambiguate; not the same as this report.\n\n## PoC\n\nEnvironment: `golang:1.25`, module using the official release (`go get github.com/labstack/echo/v5@v5.3.1`, no local `replace`). Static root `public/` contains a marker file `public/admin/secret.txt` = `SECRET`.\n\nMinimal app (the pattern under test: static served globally + a group guard intended to protect `/admin`):\n\n```go\npackage main\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/labstack/echo/v5\"\n\t\"github.com/labstack/echo/v5/middleware\"\n)\n\nfunc main() {\n\te := echo.New()\n\te.Use(middleware.Static(\"public\")) // serves ./public globally (default filesystem)\n\n\tadmin := e.Group(\"/admin\", func(next echo.HandlerFunc) echo.HandlerFunc {\n\t\treturn func(c *echo.Context) error { return c.String(http.StatusUnauthorized, \"auth required\") }\n\t})\n\tadmin.GET(\"/secret.txt\", func(c *echo.Context) error { return c.String(http.StatusOK, \"handler\") })\n\n\te.Start(\":1323\")\n}\n```\n\nRequests (unauthenticated):\n\n```\n# Literal: route matches -> group guard runs\ncurl -i http://localhost:1323/admin/secret.txt\n# => 401\n\n# %2F-encoded: route does NOT match -> guard skipped, but middleware.Static serves the file\ncurl -i --path-as-is http://localhost:1323/admin%2Fsecret.txt\n# => 200, body: SECRET\n```\n\nObserved on `v5.3.1`: literal → `401`; `%2F` → `200` with the file contents. For contrast, serving via the (patched) `e.StaticFS(\"/\")` returns `404` for the same `%2F` request, showing the `middleware.Static` path was not covered by the CVE-2026-55677 fix.\n\n## Impact\n\nAn unauthenticated remote user can retrieve a file served by `middleware.Static` even when the application attached a route/group middleware guard to that path, by substituting `/` with `%2F`. The consequence is limited to files already inside the served static root (CWE-863 authorization inconsistency; CWE-436 interpretation conflict) — **there is no access to files outside the static root**.\n\n**Honest caveat on validity / severity:** this only has security impact for applications that (a) serve a directory statically to the public *and* (b) place a sensitive file inside that same directory while relying on a *route-level* guard to protect it. That combination is arguably a misconfiguration — a statically-served directory is public by design — so maintainers may reasonably classify this as a documentation fix (correct the `EnablePathUnescaping` claim) or won't-fix rather than a code vulnerability. It is filed primarily because (1) the router-vs-handler `%2F` inconsistency is the exact class fixed in CVE-2026-55677 but left uncovered for `middleware.Static`, and (2) the docstring currently promises protection it does not provide.\n\n## Patches\n\nFixed in `github.com/labstack/echo/v5` v5.4.0 and `github.com/labstack/echo/v4` v4.16.0. With the default settings, the Static middleware resolves files from the same form of the path that the router matched, so percent-encoded paths such as `/admin%2Fsecret.txt` or `/%61dmin/secret.txt` no longer reach a file under a guarded route. Paths with `.`, `..` or empty segments are no longer served.\n\nNote: middleware registered with `Echo#Use` runs before route and group middleware, so route guards never protect files served by a global Static middleware. Keep protected files outside its root directory, or serve them with `Echo#Static` behind the guard.\n\n## Workarounds\n\nKeep files that need protection outside the Static middleware's root directory.","state":0,"publishedAt":"2026-10-28T19:54:20+00:00","modifiedAt":"2026-11-05T23:25:48.3885846+00:00","affected":[{"ecosystem":"Go","name":"github.com/labstack/echo/v5","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"5.4.0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/labstack/echo/v4","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.16.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/labstack/echo/security/advisories/GHSA-375p-5qhx-8wq4","https://github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1","https://github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af","https://github.com/labstack/echo","https://github.com/labstack/echo/releases/tag/v4.16.0","https://github.com/labstack/echo/releases/tag/v5.4.0"],"sourceUrl":"https://github.com/advisories/GHSA-375p-5qhx-8wq4","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-375p-5qhx-8wq4","identifiers":["GHSA-375p-5qhx-8wq4","CVE-2026-118650","GO-2026-6873"]},"retained":false,"historicalAffected":[]},{"revision":"46f85614bd2b4b42942d7870a02cb91a","observedAt":"2026-11-05T23:38:32.248+00:00","statement":{"source":"osv","id":"GO-2026-6873","aliases":["CVE-2026-118650","GHSA-375p-5qhx-8wq4"],"title":"URL-encoded path bypasses route/group middleware guarding a statically-served path in github.com/labstack/echo","description":"URL-encoded path bypasses route/group middleware guarding a statically-served path in github.com/labstack/echo","state":0,"publishedAt":"2026-11-05T22:54:32+00:00","modifiedAt":"2026-11-05T23:15:18.1602541+00:00","affected":[{"ecosystem":"Go","name":"github.com/labstack/echo/v4","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.16.0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/labstack/echo/v5","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"5.0.0"},{"kind":"fixed","version":"5.4.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/labstack/echo/security/advisories/GHSA-375p-5qhx-8wq4","https://github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1","https://github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af","https://github.com/labstack/echo/releases/tag/v4.16.0","https://github.com/labstack/echo/releases/tag/v5.4.0"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-6873","license":"OSV · upstream source license applies","key":"osv:GO-2026-6873","identifiers":["GO-2026-6873","CVE-2026-118650","GHSA-375p-5qhx-8wq4"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-17T05:29:43.0124777+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-17T05:29:43.0124777+00:00","lastSuccessAt":"2026-11-17T05:29:43.5521323+00:00","error":null,"lastVerifiedAt":"2026-11-17T05:29:43.5521335+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-30c3da459c38698a15d626d89e52e03e55e19fc45dae0e6d8d723cbf35472cf4-9c90debbc1f8950b3c0f1d5a421574a28f1b0b2fa45e289f49fdf2a8e9fb3901","complete":true,"records":426272,"lastAttemptAt":"2026-11-17T05:26:09.4993977+00:00","lastSuccessAt":"2026-11-17T05:26:09.3579252+00:00","error":null,"lastVerifiedAt":"2026-11-17T05:26:09.4993977+00:00","snapshotPublishedAt":"2026-11-17T05:19:51+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-86fdeb8b03f14eafa75c0af5223146b8","complete":false,"records":13836,"lastAttemptAt":"2026-11-17T05:38:12.3318417+00:00","lastSuccessAt":"2026-11-17T05:38:12.325+00:00","error":"71 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-17T05:38:12.325+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13633,"expectedIdentifiers":13890,"failedIdentifiers":71},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-17T05:29:43.0124777+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-17T05:29:43.0124777+00:00","lastSuccessAt":"2026-11-17T05:29:43.5528938+00:00","error":null,"lastVerifiedAt":"2026-11-17T05:29:43.552894+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-8fe42df9ddaa47a5bde948a2904896ae","complete":true,"records":13849,"lastAttemptAt":"2026-11-17T05:29:44.1294724+00:00","lastSuccessAt":"2026-11-17T03:28:01.122+00:00","error":null,"lastVerifiedAt":"2026-11-17T03:28:01.122+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13890,"expectedIdentifiers":13890,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-db3ae05f3e19425298b475ceb81e33f22d67df93dfef77c2b0200c8b05fd85ae","complete":true,"records":9958,"lastAttemptAt":"2026-11-17T05:29:42.9612591+00:00","lastSuccessAt":"2026-11-16T23:31:31.5526753+00:00","error":null,"lastVerifiedAt":"2026-11-17T05:29:42.9612591+00:00","snapshotPublishedAt":"2026-11-16T22:48:36+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-17T05:26:09.8083264+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-17T05:26:09.8083264+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-17T05:29:42.9762315+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-17T05:29:42.9762315+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-4595284f246a19ff96d48d7bf03711d7e7b12108e02f248fcd0079c1c749af1c","complete":true,"records":232578,"lastAttemptAt":"2026-11-17T05:29:42.8364573+00:00","lastSuccessAt":"2026-11-17T05:29:41.6968952+00:00","error":null,"lastVerifiedAt":"2026-11-17T05:29:42.8364573+00:00","snapshotPublishedAt":"2026-11-17T05:18:19+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}