CVE-2026-118655

CVE-2026-118655 is a medium-severity security vulnerability in github.com/labstack/echo/v5 (go), affecting versions < 5.2.0. It is fixed in 5.2.0, 4.15.3.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Echo has a Static Middleware Double-Unescape Path Traversal

Commit a9ede66a (PR #3006, issue #2599) silently fixed a path traversal vulnerability in the Echo web framework's static file middleware.

Vulnerability

The static middleware double-unescaped URL paths. Go's net/http already decodes Request.URL.Path, but middleware/static.go unconditionally called url.PathUnescape() again:

// BEFORE (vulnerable)
pathUnescape := true

This reassembled path traversal sequences from double-encoded input. An attacker could send GET /%2e%2e%2fsecret.txt or /..%252fsecret.txt and the double-unescape would produce ../secret.txt.

References

Patches

Fixed in github.com/labstack/echo/v5 v5.2.0 and github.com/labstack/echo/v4 v4.15.3, where the Static middleware stopped unescaping an already decoded path. Maintainer analysis: reading files outside the configured root could not be reproduced; the confirmed impact was that a double-encoded slash (%252F) could reach a file under a guarded route when the Static middleware is registered globally. Upgrade to v5.4.0 / v4.16.0 or later, which also includes related fixes for encoded and dot-segment paths.

Workarounds

Keep files that need protection outside the Static middleware's root directory.

Impact

Arbitrary file read from server filesystem via percent-encoded path traversal.

CVE-2026-118655 has a CVSS score of 5.9 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (5.2.0, 4.15.3); upgrading removes the vulnerable code path.

Affected versions

github.com/labstack/echo/v5 (< 5.2.0) github.com/labstack/echo/v4 (< 4.15.3)

Security releases

github.com/labstack/echo/v5 → 5.2.0 (go) github.com/labstack/echo/v4 → 4.15.3 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

// AFTER (fixed)
pathUnescape := false

The commit's test TestStatic_percentEncodedTraversalIsBlocked explicitly verifies traversal vectors are blocked.

Frequently Asked Questions

  1. What is CVE-2026-118655? CVE-2026-118655 is a medium-severity security vulnerability in github.com/labstack/echo/v5 (go), affecting versions < 5.2.0. It is fixed in 5.2.0, 4.15.3.
  2. How severe is CVE-2026-118655? CVE-2026-118655 has a CVSS score of 5.9 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2026-118655?
    • github.com/labstack/echo/v5 (go) (versions < 5.2.0)
    • github.com/labstack/echo/v4 (go) (versions < 4.15.3)
  4. Is there a fix for CVE-2026-118655? Yes. CVE-2026-118655 is fixed in 5.2.0, 4.15.3. Upgrade to this version or later.
  5. Is CVE-2026-118655 exploitable, and should I be worried? Whether CVE-2026-118655 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-118655 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-118655?
    • Upgrade github.com/labstack/echo/v5 to 5.2.0 or later
    • Upgrade github.com/labstack/echo/v4 to 4.15.3 or later

Other vulnerabilities in github.com/labstack/echo/v5

Stop the waste.
Protect your environment with Kodem.