{"id":"GO-2024-3293","aliases":["GO-2024-3293"],"related":[],"kind":"vulnerability","state":"published","title":"Full access to the host's OS file system using osfs.FS with Router.Static in goyave.dev/goyave/v5","summary":"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.\n\nAs 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.","summaryFormat":"markdown","summarySource":"go","descriptions":[{"lang":"en","text":"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.\n\nAs 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.","format":"markdown","source":"go"}],"published":"2024-12-13T20:59:35.000Z","modified":"2024-12-13T20:59:35.000Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"5.0.0","status":"affected","fixed":"5.5.0"}],"ecosystem":"Go","package":"goyave.dev/goyave/v5","purl":"pkg:golang/goyave.dev/goyave/v5","source":"go"}],"references":[{"url":"https://github.com/go-goyave/goyave/commit/5836bff3efaa8a37fbd58d077b93f03e93e05edd","tags":["fix"],"sources":["go"]},{"url":"https://github.com/golang/vulndb/issues/3293","tags":["web"],"sources":["go"]}],"credits":[],"sources":[{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-3293","url":"https://pkg.go.dev/vuln/GO-2024-3293","licence":"CC-BY-4.0","modified":"2024-12-13T20:59:35.000Z"}],"updatedAt":"2026-11-25T22:56:23.913Z"}