Skip to content

fix(deps): update module github.com/labstack/echo/v5 to v5.2.0 (internal/test) [security] - #2541

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/internal/test/go-github.com-labstack-echo-v5-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/internal/test/go-github.com-labstack-echo-v5-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
github.com/labstack/echo/v5 v5.1.0 → v5.2.0 age confidence

Echo: Encoded slash (%2F) bypasses route-level protection and exposes static files

CVE-2026-55677 / GHSA-vfp3-v2gw-7wfq

More information

Details

Summary

Echo's router and static file handler disagree on URL path decoding. The router matches routes using the raw encoded path (preserving %2F as-is), while StaticDirectoryHandler unescapes %2F to / before resolving filesystem paths. This allows an attacker to bypass route-level access controls and read static files without authorization.

Details

Root cause 1 — router.go lines 798-802:
The router uses req.URL.RawPath for route matching when useEscapedPathForRouting is false (the default). This means /admin%2Fsecret.txt is treated as a single path segment and does NOT match the /admin/* route pattern.

if !r.useEscapedPathForRouting && req.URL.RawPath != "" {
    path = req.URL.RawPath
}

Root cause 2 — echo.go lines 559-568:
StaticDirectoryHandler calls url.PathUnescape() on the path parameter before opening files. This converts %2F back to /, resolving admin/secret.txt on disk.

if !disablePathUnescaping {
    tmpPath, err := url.PathUnescape(p)
    p = tmpPath
}
name := filepath.ToSlash(filepath.Clean(strings.TrimPrefix(p, "/")))
PoC (Screenshot)

Sample:
image

403:
image

Bypass with encoded slash:
image

Impact

Unauthorized static file disclosure. Applications that protect route prefixes with authentication middleware while also serving static files from a broader root are vulnerable. An attacker only needs to encode the slash (/ → %2F) in the URL to bypass all route-level protection.

Common affected pattern:

adminGroup := e.Group("/admin", authMiddleware)
e.StaticFS("/", os.DirFS("public"))

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

labstack/echo (github.com/labstack/echo/v5)

v5.2.0

Compare Source

Security

Fixes GHSA-vfp3-v2gw-7wfq: an encoded path separator (%2F or %5C) in a static file URL could bypass route-level middleware (e.g. authentication on a sibling route) and disclose static files. Both StaticDirectoryHandler/StaticFS and the Static middleware are affected. Thanks to @​a-tt-om and @​oran-gugu for reporting.

Enhancements

New Contributors

Full Changelog: labstack/echo@v5.1.1...v5.2.0

v5.1.1

Compare Source

Security

Thanks to @​shblue21 for reporting this issue.

Enhancements


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from a team as a code owner August 25, 2026 20:57
@renovate renovate Bot added the dependencies-test-only Test-only dependencies (`internal/test` or `examples/`) label Aug 25, 2026
@socket-security

socket-security Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgithub.com/​labstack/​echo/​v5@​v5.1.0 ⏵ v5.2.072 +1100 +16100100100

View full report

@greptile-apps

greptile-apps Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge.

Summary

The PR updates the internal test module from Echo v5.1.0 to v5.2.0, incorporating the encoded-path-separator security fix.

  • Updates the direct Echo v5 requirement in internal/test/go.mod.
  • Refreshes the corresponding module checksums in internal/test/go.sum.

Reviews (2) · Last reviewed commit: "fix(deps): update module github.com/labs..."

@renovate
renovate Bot force-pushed the renovate/internal/test/go-github.com-labstack-echo-v5-vulnerability branch from e2d98ff to 75612f8 Compare August 28, 2026 09:52
@renovate
renovate Bot force-pushed the renovate/internal/test/go-github.com-labstack-echo-v5-vulnerability branch from 75612f8 to 156bbf5 Compare September 23, 2026 23:45
@renovate
renovate Bot force-pushed the renovate/internal/test/go-github.com-labstack-echo-v5-vulnerability branch from 156bbf5 to f7e2f21 Compare September 24, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies-test-only Test-only dependencies (`internal/test` or `examples/`)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants