GHSA-8v2v-wjwg-vx6r: actix-files has a possible exposure of information vulnerability
Summary When passing a non-existing folder to the actixfiles::Files::new() method causes the actix server to expose unexpected files. Details The actix-files library exposes a Files struct that configures an actix service to serve the files in a folder as static assets.
Published Feb 6, 2026
Affected packages
actix-files
- Ecosystem
- Rust (crates.io)
- Affected
- <= 0.6.9
- Fixed in
- 0.6.10
- Check
cargo tree -i actix-files
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
When passing a non-existing folder to the actix_files::Files::new() method causes the actix server to expose unexpected files.
Details
The actix-files library exposes a `Files` struct that configures an actix service to serve the files in a folder as static assets. Below you can find the signature of the `Files::new` method:
pub fn new<T: Into<PathBuf>>(mount_path: &str, serve_from: T) -> FilesWhen the mount_path you pass to Files doesn't exist, it defaults to an empty path (Path::new()). When the service receives a HTTP request, it joins the request information with the empty path and calls canonicalize. Rust resolves this path as relative and returns any file that matches it.
This behavior causes the library to expose unexpected files when the folder is not present.
PoC
_There is a working PoC on https://github.com/Angelmmiguel/actix-files-vuln, although the next steps can be followed to reproduce the issue_
- Clone the https://github.com/actix/examples repository.
- Change your directory to the
basics/static-filesfolder. - Edit the
src/main.rsfile and change the line 13 to mount a non-existing folder:
- .service(Files::new("/images", "static/images/").show_files_listing())
+ .service(Files::new("/images", "static/missing/").show_files_listing())- Run the project with
cargo run. - Access the URL.
Impact
This is an exposure of information vulnerability. It affects anyone using the actix-files::Files library that mounts a non-existing folder for any reason.
Credited to Angelmmiguel, JohnTitor.
References
- https://github.com/actix/actix-web/security/advisories/GHSA-8v2v-wjwg-vx6r
- https://github.com/actix/actix-web/blob/fba766b4beb92278665d58815c94d336015225c5/actix-files/src/files.rs#L104
- https://github.com/actix/actix-web/blob/fba766b4beb92278665d58815c94d336015225c5/actix-files/src/files.rs#L38
- https://github.com/actix/actix-web/blob/fba766b4beb92278665d58815c94d336015225c5/actix-files/src/files.rs#L98
- https://github.com/actix/actix-web/blob/fba766b4beb92278665d58815c94d336015225c5/actix-files/src/service.rs#L136
- https://github.com/advisories/GHSA-8v2v-wjwg-vx6r
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
