Skip to content

fix(deps): update module github.com/labstack/echo/v4 to v5#38

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/github.com-labstack-echo-v4-5.x
Open

fix(deps): update module github.com/labstack/echo/v4 to v5#38
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/github.com-labstack-echo-v4-5.x

Conversation

@renovate

@renovate renovate Bot commented Jan 18, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
github.com/labstack/echo/v4 v4.15.1v5.2.1 age confidence

Release Notes

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

v5.2.1

Compare Source

Security

Make serving static file releated methods and middleware not unescape path by default - so how the way Router interprets paths and Static methods/middleware is consistent.

Given following situation:

// 0.
// given folder structure:
// private.txt
// public/
// public/index.html
// public/text.txt
// public/admin/private.txt

// 1. share `public/` folder contents from the server root. This folder actually contains subfolder `admin` which
// contents we want to forbid from downloading
e.Static("/", "public")

// 2. naively assume that everything under /admin folder is now forbidden
e.GET("/admin/*", func(c *Context) error {
    return ErrForbidden
})

Then requests to /admin%2fprivate.txt would not be matched to GET /admin/* route (routing does not look unescaped path) and static file serving will use unescaped path to serve the file.

Note: this way of "guarding" subfolders will never work for for paths like /assets/../admin%2fprivate.txt which will path.Clean("/assets/../admin%2fprivate.txt") to /admin/private.txt and are servable if static file serving is configured to unescape paths.

If you want to guard routes - use middlewares on Static* methods and before Static middleware.


  • revert PR #​3009 changes to just disabling path escaping by default in static methods/middleware by @​aldas in #​3016

Closes GHSA-vfp3-v2gw-7wfq more completely: the previous fix (#​3009) rejected explicitly encoded
separators at the handler level; this patch makes the no-unescape behavior the default so new configurations are safe without extra opt-out steps.

What changed: DisablePathUnescaping (on StaticConfig and StaticDirectoryHandlerConfig) is deprecated and replaced by EnablePathUnescaping (default false). Path unescaping is now opt-in.

What this protects: With EnablePathUnescaping: false (new default), encoded separators (%2F, %5C) are never decoded before routing or file lookup, so they cannot
bypass route-level authentication or other middleware guards.

What this does NOT protect: Serving a directory with Static, StaticFS, or StaticDirectoryHandler exposes its entire subtree. Sibling routes are not a reliable
ACL boundary — attach authorization middleware directly to the static mount, or serve sensitive sub-trees under separate guarded routes.

Breaking change / migration: If you serve files whose names contain URL-encoded characters (e.g., /hello%20world.txthello world.txt), you must now opt in:

// Static middleware
e.Use(middleware.StaticWithConfig(middleware.StaticConfig{
    EnablePathUnescaping: true, // only safe when NOT relying on route-based ACL guards
    ...
}))

// StaticDirectoryHandler
middleware.StaticDirectoryHandler(fs, &middleware.StaticDirectoryHandlerConfig{
    EnablePathUnescaping: true,
})

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

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

v5.1.0

Compare Source

Security

This change does not break the API contract, but it does introduce breaking changes in logic/behavior.
If your application is using c.RealIP() beware and read https://echo.labstack.com/docs/ip-address

v4 behavior can be restored with:

e := echo.New()
e.IPExtractor = echo.LegacyIPExtractor()
  • Remove legacy IP extraction logic from context.RealIP method by @​aldas in #​2933

Enhancements

v5.0.4

Compare Source

Enhancements

v5.0.3

Compare Source

Security

  • Fix directory traversal vulnerability under Windows in Static middleware when default Echo filesystem is used. Reported by @​shblue21.

This applies to cases when:

  • Windows is used as OS
  • middleware.StaticConfig.Filesystem is nil (default)
  • echo.Filesystem is has not been set explicitly (default)

Exposure is restricted to the active process working directory and its subfolders.

v5.0.2

Compare Source

Security

  • Fix Static middleware with config.Browse=true lists all files/subfolders from config.Filesystem root and not starting from config.Root in #​2887

v5.0.1

Compare Source

v5.0.0

Compare Source

Echo v5 is maintenance release with major breaking changes

  • Context is now struct instead of interface and we can add method to it in the future in minor versions.
  • Adds new Router interface for possible new routing implementations.
  • Drops old logging interface and uses moderm log/slog instead.
  • Rearranges alot of methods/function signatures to make them more consistent.

Upgrade notes and v4 support:

  • Echo v4 is supported with security* updates and bug fixes until 2026-12-31
  • If you are using Echo in a production environment, it is recommended to wait until after 2026-03-31 before upgrading.
  • Until 2026-03-31, any critical issues requiring breaking v5 API changes will be addressed, even if this violates semantic versioning.

See API_CHANGES_V5.md for public API changes between v4 and v5, notes on upgrading.

Upgrading TLDR:

If you are using Linux you can migrate easier parts like that:

find . -type f -name "*.go" -exec sed -i 's/ echo.Context/ *echo.Context/g' {} +
find . -type f -name "*.go" -exec sed -i 's/echo\/v4/echo\/v5/g' {} +

macOS

find . -type f -name "*.go" -exec sed -i '' 's/ echo.Context/ *echo.Context/g' {} +
find . -type f -name "*.go" -exec sed -i '' 's/echo\/v4/echo\/v5/g' {} +

or in your favorite IDE

Replace all:

  1. echo.Context -> *echo.Context
  2. echo/v4 -> echo/v5

This should solve most of the issues. Probably the hardest part is updating all the tests.

v4.15.4

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 (used by Static/StaticFS) and the Static middleware are affected. Backport of the v5 fix (#​3016, released in v5.2.1). Thanks to @​a-tt-om and @​oran-gugu for reporting.


Make serving static file releated methods and middleware not unescape path by default - so how the way Router interprets paths and Static methods/middleware is consistent.

Given following situation:

// 0.
// given folder structure:
// private.txt
// public/
// public/index.html
// public/text.txt
// public/admin/private.txt

// 1. share `public/` folder contents from the server root. This folder actually contains subfolder `admin` which
// contents we want to forbid from downloading
e.Static("/", "public")

// 2. naively assume that everything under /admin folder is now forbidden
e.GET("/admin/*", func(c *Context) error {
    return ErrForbidden
})

Then requests to /admin%2fprivate.txt would not be matched to GET /admin/* route (routing does not look unescaped path) and static file serving will use unescaped path to serve the file.

Note: this way of "guarding" subfolders will never work for for paths like /assets/../admin%2fprivate.txt which will path.Clean("/assets/../admin%2fprivate.txt") to /admin/private.txt and are servable if static file serving is configured to unescape paths.

If you want to guard routes - use middlewares on Static* methods and before Static middleware.

Breaking change / migration: If you serve files whose names contain URL-encoded characters (e.g., /hello%20world.txthello world.txt), you must now opt in:

	e := echo.New()
	e.EnablePathUnescapingStaticFiles = true  // <-- enable old behavior
	e.Static("/", "public")

for static middleware

	e.Use(middleware.StaticWithConfig(middleware.StaticConfig{
		EnablePathUnescaping: true, // <-- enable old behavior
	}))

Full Changelog: labstack/echo@v4.15.3...v4.15.4

v4.15.3: - Static encoded-separator route bypass fix (GHSA-vfp3-v2gw-7wfq)

Compare Source

Security

  • fix(static): reject encoded path separators that bypass route-level middleware by @​vishr in #​3011

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 (used by Static/StaticFS) and the Static middleware are affected. Backport of the v5 fix (#​3009, released in v5.2.0). Thanks to @​a-tt-om and @​oran-gugu for reporting.

Full Changelog: labstack/echo@v4.15.2...v4.15.3

v4.15.2: - Context.Scheme() header validation

Compare Source

Security

Thanks to @​shblue21 for reporting this issue.

Full Changelog: labstack/echo@v4.15.1...v4.15.2


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 force-pushed the renovate/github.com-labstack-echo-v4-5.x branch 2 times, most recently from eba8ff1 to 616fa09 Compare February 2, 2026 22:32
@renovate renovate Bot force-pushed the renovate/github.com-labstack-echo-v4-5.x branch 6 times, most recently from 47a563a to d40cb9f Compare February 12, 2026 10:41
@renovate renovate Bot force-pushed the renovate/github.com-labstack-echo-v4-5.x branch from d40cb9f to 4b6feb5 Compare February 15, 2026 17:52
@renovate renovate Bot force-pushed the renovate/github.com-labstack-echo-v4-5.x branch from 4b6feb5 to a9801cc Compare February 24, 2026 14:52
@renovate renovate Bot force-pushed the renovate/github.com-labstack-echo-v4-5.x branch from a9801cc to aedc6b8 Compare March 5, 2026 17:29
@renovate renovate Bot changed the title fix(deps): update module github.com/labstack/echo/v4 to v5 fix(deps): update module github.com/labstack/echo/v4 to v5 - autoclosed Mar 12, 2026
@renovate renovate Bot closed this Mar 12, 2026
@renovate renovate Bot deleted the renovate/github.com-labstack-echo-v4-5.x branch March 12, 2026 18:06
@renovate renovate Bot changed the title fix(deps): update module github.com/labstack/echo/v4 to v5 - autoclosed fix(deps): update module github.com/labstack/echo/v4 to v5 Mar 12, 2026
@renovate renovate Bot reopened this Mar 12, 2026
@renovate renovate Bot force-pushed the renovate/github.com-labstack-echo-v4-5.x branch 2 times, most recently from aedc6b8 to 4716748 Compare March 12, 2026 22:33
@renovate renovate Bot force-pushed the renovate/github.com-labstack-echo-v4-5.x branch 5 times, most recently from 0d05e86 to fbf7254 Compare April 1, 2026 19:01
@renovate renovate Bot changed the title fix(deps): update module github.com/labstack/echo/v4 to v5 fix(deps): update module github.com/labstack/echo/v4 to v5 - autoclosed Apr 29, 2026
@renovate renovate Bot closed this Apr 29, 2026
@renovate renovate Bot changed the title fix(deps): update module github.com/labstack/echo/v4 to v5 - autoclosed fix(deps): update module github.com/labstack/echo/v4 to v5 Apr 29, 2026
@renovate renovate Bot reopened this Apr 29, 2026
@renovate renovate Bot force-pushed the renovate/github.com-labstack-echo-v4-5.x branch 3 times, most recently from 458da01 to 71d98ad Compare May 1, 2026 21:01
@renovate

renovate Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

ℹ️ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 11 additional dependencies were updated

Details:

Package Change
github.com/labstack/gommon v0.4.2 -> v0.5.0
github.com/mattn/go-colorable v0.1.14 -> v0.1.15
github.com/mattn/go-isatty v0.0.20 -> v0.0.22
golang.org/x/crypto v0.49.0 -> v0.53.0
golang.org/x/mod v0.34.0 -> v0.36.0
golang.org/x/net v0.52.0 -> v0.56.0
golang.org/x/sync v0.20.0 -> v0.21.0
golang.org/x/sys v0.42.0 -> v0.46.0
golang.org/x/text v0.35.0 -> v0.38.0
golang.org/x/time v0.14.0 -> v0.15.0
golang.org/x/tools v0.43.0 -> v0.45.0

@renovate renovate Bot changed the title fix(deps): update module github.com/labstack/echo/v4 to v5 fix(deps): update module github.com/labstack/echo/v4 to v5 - autoclosed May 26, 2026
@renovate renovate Bot closed this May 26, 2026
@renovate renovate Bot changed the title fix(deps): update module github.com/labstack/echo/v4 to v5 - autoclosed fix(deps): update module github.com/labstack/echo/v4 to v5 May 26, 2026
@renovate renovate Bot reopened this May 26, 2026
@renovate renovate Bot force-pushed the renovate/github.com-labstack-echo-v4-5.x branch 2 times, most recently from 71d98ad to 00539ae Compare May 26, 2026 20:56
@renovate renovate Bot changed the title fix(deps): update module github.com/labstack/echo/v4 to v5 fix(deps): update module github.com/labstack/echo/v4 to v5 - autoclosed Jun 3, 2026
@renovate renovate Bot closed this Jun 3, 2026
@renovate renovate Bot changed the title fix(deps): update module github.com/labstack/echo/v4 to v5 - autoclosed fix(deps): update module github.com/labstack/echo/v4 to v5 Jun 3, 2026
@renovate renovate Bot reopened this Jun 3, 2026
@renovate renovate Bot force-pushed the renovate/github.com-labstack-echo-v4-5.x branch 2 times, most recently from 00539ae to 0cca360 Compare June 3, 2026 20:13
@renovate renovate Bot changed the title fix(deps): update module github.com/labstack/echo/v4 to v5 fix(deps): update module github.com/labstack/echo/v4 to v5 - autoclosed Jun 8, 2026
@renovate renovate Bot closed this Jun 8, 2026
@renovate renovate Bot changed the title fix(deps): update module github.com/labstack/echo/v4 to v5 - autoclosed fix(deps): update module github.com/labstack/echo/v4 to v5 Jun 8, 2026
@renovate renovate Bot reopened this Jun 8, 2026
@renovate renovate Bot force-pushed the renovate/github.com-labstack-echo-v4-5.x branch 3 times, most recently from e8db6ee to bcf6f68 Compare June 14, 2026 18:15
@renovate renovate Bot force-pushed the renovate/github.com-labstack-echo-v4-5.x branch from bcf6f68 to 278a5cc Compare June 15, 2026 23:11
@renovate renovate Bot changed the title fix(deps): update module github.com/labstack/echo/v4 to v5 fix(deps): update module github.com/labstack/echo/v4 to v5 - autoclosed Jun 21, 2026
@renovate renovate Bot closed this Jun 21, 2026
@renovate renovate Bot changed the title fix(deps): update module github.com/labstack/echo/v4 to v5 - autoclosed fix(deps): update module github.com/labstack/echo/v4 to v5 Jun 21, 2026
@renovate renovate Bot reopened this Jun 21, 2026
@renovate renovate Bot force-pushed the renovate/github.com-labstack-echo-v4-5.x branch 2 times, most recently from 278a5cc to bf6f9d3 Compare June 21, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants