CVE-2026-25766
Path Traversal in Echo Middleware.Static Allows Remote File Read
Publication date: 2026-02-19
Last updated on: 2026-02-23
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| labstack | echo | From 5.0.0 (inc) to 5.0.3 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-22 | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in the Echo Go web framework versions 5.0.0 through 5.0.2 on Windows. It involves the middleware.Static component using the default filesystem, which allows path traversal via backslashes. The issue arises because the requested path is unescaped and normalized using path.Clean, which follows URL semantics and does not treat backslashes as path separators. As a result, sequences like "..\" remain in the cleaned path. When this path is passed to the filesystem's Open method, on Windows, os.Open treats backslashes as path separators and resolves "..\" sequences, allowing an attacker to read files outside the intended static root directory without authentication.
This vulnerability was fixed in version 5.0.3 of Echo.
How can this vulnerability impact me? :
This vulnerability allows an unauthenticated remote attacker to perform path traversal and read arbitrary files outside the intended static root directory on a Windows system running vulnerable versions of the Echo framework. This can lead to unauthorized disclosure of sensitive files, potentially exposing configuration files, source code, or other sensitive data.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
I don't know
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, upgrade the Echo web framework to version 5.0.3 or later, where the issue has been fixed.