CVE-2026-25766 in echoinfo

Summary

by MITRE • 02/19/2026

Echo is a Go web framework. In versions 5.0.0 through 5.0.2 on Windows, Echo’s `middleware.Static` using the default filesystem allows path traversal via backslashes, enabling unauthenticated remote file read outside the static root. In `middleware/static.go`, the requested path is unescaped and normalized with `path.Clean` (URL semantics). `path.Clean` does not treat `\` as a path separator, so `..\` sequences remain in the cleaned path. The resulting path is then passed to `currentFS.Open(...)`. When the filesystem is left at the default (nil), Echo uses `defaultFS` which calls `os.Open` (`echo.go:792`). On Windows, `os.Open` treats `\` as a path separator and resolves `..\`, allowing traversal outside the static root. Version 5.0.3 fixes the issue.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 02/22/2026

The vulnerability identified as CVE-2026-25766 affects the Echo Go web framework version 5.0.0 through 5.0.2 on Windows operating systems. This security flaw resides within the middleware.Static functionality which is designed to serve static files from a specified directory. The issue stems from a fundamental mismatch in how path normalization is handled between the Go standard library's path.Clean function and the Windows operating system's file handling mechanisms. When a client makes a request containing path traversal sequences using backslashes, the framework fails to properly sanitize these requests before passing them to the underlying file system.

The technical implementation of this vulnerability occurs in the middleware/static.go file where the requested path undergoes processing through path.Clean function which follows URL semantics and does not treat backslashes as path separators. This means that sequences like "..\" remain intact in the normalized path string. When the default filesystem is used, which is essentially os.Open on Windows systems, the backslashes are interpreted by the Windows file system as path separators, allowing attackers to traverse directories outside the intended static root. This creates a path traversal condition where malicious requests can access files that should be restricted to the static directory. The vulnerability is specifically Windows-dependent because the os.Open function on Windows treats backslashes as path separators while the path.Clean function on Unix-like systems would normalize the path differently.

The operational impact of this vulnerability is significant as it allows unauthenticated remote file read access outside the static root directory. An attacker can exploit this to access sensitive files such as configuration files, source code, or other system files that should be protected from public access. The vulnerability enables arbitrary file reading across the file system, potentially leading to information disclosure, system compromise, or further exploitation opportunities. Given that Echo is a popular web framework, this vulnerability could affect numerous applications deployed on Windows servers, making it a critical security concern for organizations relying on this technology stack. The vulnerability aligns with CWE-22 Path Traversal and follows ATT&CK technique T1083 File and Directory Discovery, as it enables unauthorized access to file system contents through improper path handling.

The fix implemented in version 5.0.3 addresses this issue by properly handling path normalization on Windows systems. The solution likely involves ensuring that path traversal sequences are properly sanitized regardless of the operating system's path separator conventions. This may include converting backslashes to forward slashes before path normalization, or implementing additional checks to prevent backslash-based path traversal. Organizations should immediately upgrade to version 5.0.3 or later to remediate this vulnerability. In the interim, administrators can mitigate the risk by restricting access to static file endpoints, implementing additional authentication mechanisms, or deploying network-level restrictions that prevent access to potentially vulnerable paths. The vulnerability demonstrates the importance of considering platform-specific behaviors when implementing security controls and highlights the need for thorough testing across different operating systems when developing web applications.

Disclosure

02/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00068

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!