# GO-2024-3293: Full access to the host's OS file system using osfs.FS with Router.Static in goyave.dev/goyave/v5

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-12-13T20:59:35.000Z
- Modified: 2024-12-13T20:59:35.000Z

## Description

Static file serving using router.Static and osfs.FS allows clients to access any file on the host file system using relative paths because the requested path is not sanitized and . and .. segments are accepted. The files will be returned as a response, provided the system user running the Go application has read access to the requested file.

As a workaround, use fsutil.NewEmbed(embeddedFS) from the goyave.dev/goyave/v5/util/fsutil package to serve static content using Router.Static instead of &osfs.FS. Embedded file systems are rooted to the specified directory, making it impossible to navigate outside of the developers' intended directory.

(As written by Go Vulnerability Database.)

## Affected

- goyave.dev/goyave/v5 (Go): from 5.0.0 before 5.5.0

## References

- <https://github.com/go-goyave/goyave/commit/5836bff3efaa8a37fbd58d077b93f03e93e05edd> (fix)
- <https://github.com/golang/vulndb/issues/3293> (web)

## Sources

- Go Vulnerability Database: [GO-2024-3293](https://pkg.go.dev/vuln/GO-2024-3293), CC-BY-4.0, modified 2024-12-13

---

Page: https://cve.day/GO-2024-3293 · Whole record: https://cve.day/GO-2024-3293.json · Rebuilt by cve.day 2026-11-25T22:56:23.913Z
