actix-files
Affected
- introduced
0, fixed0.6.10(semver)
Fixed versions
0.6.10
Fix
- Fixed version
0.6.10cargo update -p actix-files --precise 0.6.10
Advisory
Also known as: CVE-2026-72814
actix-files has a possible exposure of information vulnerability
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) -> Files
When 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_
basics/static-files folder.src/main.rs file and change the line 13 to mount a non-existing folder: ```diff
- .service(Files::new("/images", "static/images/").show_files_listing())
+ .service(Files::new("/images", "static/missing/").show_files_listing())
```
cargo run.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.
Medium Basis: The source's own band: MODERATE
0, fixed 0.6.10 (semver)0.6.10
0.6.10cargo update -p actix-files --precise 0.6.10Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0