6.3medium
actix-files before 0.6.10 Information Disclosure via Files
- Severity
- 6.3medium CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.54% (higher than 46% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-8v2v-wjwg-vx6r
Description
The actix-files crate (actix_files) before version 0.6.10 contains an information exposure vulnerability. When a non-existing folder is passed as the serve_from argument to Files::new(), the mount path defaults to an empty path; the service then joins the request path with this empty path and canonicalizes it, causing Rust to resolve it as a relative path. As a result, an attacker can request paths that resolve relative to the application's working directory and access unintended files.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| actix actix-files | before 0.6.10 Not affected: 0.6.10 | CVE List |
| actix-files (crates.io) | before 0.6.10 | GitHub Advisory Database |
All scores
| VulnCheck | 6.3medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
Classification
What each source says
CVE List
The actix-files crate (actix_files) before version 0.6.10 contains an information exposure vulnerability. When a non-existing folder is passed as the serve_from argument to Files::new(), the mount path defaults to an empty path; the service then joins the request path with this empty path and canonicalizes it, causing Rust to resolve it as a relative path. As a result, an attacker can request paths that resolve relative to the application's working directory and access unintended files.
GitHub Advisory Database
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
-
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.
NVD (es)
El crate actix-files (actix_files) anterior a la versión 0.6.10 contiene una vulnerabilidad de exposición de información. Cuando se pasa una carpeta inexistente como argumento serve_from a Files::new(), la ruta de montaje por defecto es una ruta vacía; el servicio luego une la ruta de la solicitud con esta ruta vacía y la canoniza, lo que hace que Rust la resuelva como una ruta relativa. Como resultado, un atacante puede solicitar rutas que se resuelven de forma relativa al directorio de trabajo de la aplicación y acceder a archivos no deseados.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-72814 changed 2026-10-29 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8v2v-wjwg-vx6r changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-72814 changed 2026-10-29 | Public domain |