CVE-2026-7381 Plack::Middleware::XSendfile versions through 1.0053 for Perl can allow client-controlled path rewriting
A malicious client can manipulate headers to read arbitrary files on the server via path rewriting in the deprecated Plack::Middleware::XSendfile library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-7381?
CVE-2026-7381 is a critical path traversal vulnerability in MIYAGAWA Plack::Middleware::XSendfile, published on 29 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Plack::Middleware::XSendfile versions through 1.0053 for Perl can allow client-controlled path rewriting.
Plack::Middleware::XSendfile allows the variation setting (sendfile type) to be set by the client via the X-Sendfile-Type header, if it is not considered in the middleware constructor or the Plack environment.
A malicious client can set the X-Sendfile-Type header to "X-Accel-Redirect" to services running behind nginx reverse proxies, and then set the X-Accel-Mapping to map the path to an arbitrary file on the server.
Since 1.0053, Plack::Middleware::XSendfile is deprecated and will be removed from future releases of Plack.
This is similar to CVE-2025-61780 for Rack::Sendfile, although Plack::Middleware::XSendfile has some mitigations that disallow regular expressions to be used in the mapping, and only apply the mapping for the "X-Accel-Redirect" type.
Which versions are affected by CVE-2026-7381?
It affects 1 product.
Products include Miyagawa Plack\.
How do I fix CVE-2026-7381?
Product is end of life, replace it.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-7381 being exploited?
There is no known exploitation of CVE-2026-7381 in the wild and no public exploit code.
Other vulnerabilities in MIYAGAWA Plack::Middleware::XSendfile
Sources
Also known as DEBIAN-CVE-2026-7381, GHSA-j2f5-52cv-9wrh, MGASA-2026-0350, UBUNTU-CVE-2026-7381.