—
GO-2026-4950
Authorization bypass via double-encoded paths in github.com/valyala/fasthttp
Quick fix
GO-2026-4950 — github.com/valyala/fasthttp: upgrade to the fixed version with the command below.
go get github.com/valyala/fasthttp@v1.70.0 Details
In github.com/valyala/fasthttp before 1.70.0, ServeFile and ServeFS reinterpret filesystem paths as URIs, decoding percent-encoded sequences and treating characters like '?' and '#' as URI delimiters. In applications where authorization guards inspect ctx.Path() before passing paths to file-serving handlers, double-encoded path variants (e.g., /%2561dmin/export.csv) bypass access controls while still resolving to the protected file on disk.
Are you affected?
Enter the version of the package you're using.
Affected packages
Go / github.com/valyala/fasthttp
Introduced in:
0 Fixed in: 1.70.0 Fix
go get github.com/valyala/fasthttp@v1.70.0