UBUNTU-CVE-2026-118266: CSRF

Published Oct 29, 2026
·
Updated

Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, Echo's MethodOverride middleware accepts a safe HTTP method as the override target for a POST request. When MethodOverride is registered before CSRF in the post-routing middleware chain, route selection retains the original state-changing POST handler but the override changes the method before CSRF evaluates it, causing both token validation and Sec-Fetch-Site checks to be skipped. A cross-site exploit requires an authenticated victim and an override value that a browser-submitted request can control, such as the form getter used by the advisory reproducer; the default X-HTTP-Method-Override header getter is not settable by a cross-site form. This issue is fixed in 4.16.0 and 5.4.0.

Affected Software

6 affected components
ubuntu/golang-github-labstack-echo.v2*
ubuntu/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo.v2*
ubuntu/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Echo 4.x to a version that resolves this vulnerability.

    Fixed in 4.16.0
  2. Upgrade

    Upgrade Echo 5.x to a version that resolves this vulnerability.

    Fixed in 5.4.0

Frequently Asked Questions

1

Which deployments are practically exposed to cross-site exploitation?

Deployments are exposed when MethodOverride runs before CSRF in the post-routing middleware chain and uses an override source that a browser-submitted cross-site request can control, such as the form getter. Exploitation also requires an authenticated victim.

2

Is the default method-override configuration vulnerable to a cross-site form attack?

The default X-HTTP-Method-Override header getter is not settable by a cross-site form. The described cross-site exploit therefore depends on a controllable override value rather than that default header getter.

3

What should be changed if an upgrade cannot be applied immediately?

Ensure MethodOverride is not registered before CSRF in the post-routing middleware chain, and avoid method-override getters that can be controlled by browser-submitted cross-site requests. This prevents the override from changing the method before CSRF checks run.

4

Which versions contain the fix?

The issue is fixed in Echo 4.16.0 and 5.4.0. Versions prior to those releases are affected under the described middleware ordering and override-source conditions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203