Summary
actix-files has a possible exposure of information vulnerability
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
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 http://localhost:8080/images/Cargo.toml 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.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is GHSA-8V2V-WJWG-VX6R? GHSA-8V2V-WJWG-VX6R is a medium-severity security vulnerability in actix-files (rust), affecting versions <= 0.6.9. It is fixed in 0.6.10.
- Which versions of actix-files are affected by GHSA-8V2V-WJWG-VX6R? actix-files (rust) versions <= 0.6.9 is affected.
- Is there a fix for GHSA-8V2V-WJWG-VX6R? Yes. GHSA-8V2V-WJWG-VX6R is fixed in 0.6.10. Upgrade to this version or later.
- Is GHSA-8V2V-WJWG-VX6R exploitable, and should I be worried? Whether GHSA-8V2V-WJWG-VX6R is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-8V2V-WJWG-VX6R is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-8V2V-WJWG-VX6R? Upgrade
actix-filesto 0.6.10 or later.