CVE-2020-36565: Directory Traversal Vulnerability in github.com/labstack/echo/v4

github.com/labstack/echo/v4 Updated 02 Oct 2025

Summary

07/12/2022
Yes i
Moderate
5.3

CVE-2020-36565: Echo vulnerable to directory traversal. Affects github.com/labstack/echo/v4 versions < 4.2.0. Fixed in 4.2.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

github.com/labstack/echo/v4 is a Go package that provides a web framework for building HTTP servers and RESTful APIs. It offers various features such as routing, middleware, and request/response handling. However, a directory traversal vulnerability has been discovered in this package.

Vulnerability Detail

The directory traversal vulnerability in github.com/labstack/echo/v4 is a result of improper sanitization of user input on Windows. The static file handler fails to properly validate user-supplied paths, allowing an attacker to traverse directories and read files outside of the target directory that the server has permission to read. This can lead to unauthorized access to sensitive information and potential data leakage.

How To Fix

Latest published version: v4.16.1 as of 23 Oct 2026

go get github.com/labstack/echo/v4@v4.16.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.2.0

This is the first release that contains the fix.

go get github.com/labstack/echo/v4@v4.2.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to upgrade to the latest version of github.com/labstack/echo/v4 to mitigate the risk.

Conclusion

In conclusion, the directory traversal vulnerability in github.com/labstack/echo/v4 can lead to unauthorized access to sensitive files and potential data leakage. It is crucial for developers to upgrade to version 4.2.0 or later to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/labstack/echo/v4 →

Share this vulnerability

FAQ

Directory traversal, also known as path traversal, is a vulnerability that allows an attacker to access files and directories outside of the intended scope. It occurs when user input is not properly validated or sanitized, allowing attackers to manipulate file paths and traverse directories.

The directory traversal vulnerability in github.com/labstack/echo/v4 can lead to unauthorized access to sensitive files and data leakage. Attackers may be able to read confidential information, such as configuration files or user data, that should not be accessible to them.

No, versions prior to 4.2.0 are affected by this vulnerability. It is recommended to upgrade to version 4.2.0 or later to mitigate the risk.

There is no known exploit available for this vulnerability at the time of this report. However, it is important to address the vulnerability promptly to prevent potential exploitation.

You can find more information about this vulnerability in the GitHub Security Advisory database. The advisory for this vulnerability can be accessed at: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/12/GHSA-j453-hm5x-c46w/GHSA-j453-hm5x-c46w.json

Related vulnerabilities

Recent vulnerabilities recorded for github.com/labstack/echo/v4.

How To Fix

Latest published version: v4.16.1 as of 23 Oct 2026

go get github.com/labstack/echo/v4@v4.16.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.2.0

This is the first release that contains the fix.

go get github.com/labstack/echo/v4@v4.2.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback