CRITICAL🇵🇱 Wersja polska

CVE-2026-7381

CVSS 9.1v3.1pub. 2026-04-29upd. 2026-05-07

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.

🤖 AI Analysis
How it works

The middleware does not require the sendfile mechanism type (variation setting) to be established in the constructor or Plack environment — the client can control it by sending the HTTP X-Sendfile-Type header. The attacker sets this header to the value "X-Accel-Redirect" and then uses the X-Accel-Mapping header to define path mapping, pointing to any file on the server. As a result, nginx serves the file indicated by the attacker instead of the one approved by the application. The vulnerability is similar to CVE-2025-61780 concerning Rack::Sendfile, although Plack::Middleware::XSendfile does not allow regular expressions in mapping and limits the attack exclusively to X-Accel-Redirect mode.

Impact

An attacker without any privileges can gain access to arbitrary files on the server (e.g., configuration files, private keys, user data), leading to critical breach of confidentiality and integrity of stored information.

Mitigation & patch

Immediate discontinuation of Plack::Middleware::XSendfile use is required — since version 1.0053 the module is marked as deprecated and will be removed in future Plack releases. Apply patches available from the vendor according to the references and verify the middleware configuration for explicit sendfile type setting in the constructor or Plack environment, rather than leaving this decision to the client.

Who is affected

Plack::Middleware::XSendfile in versions up to and including 1.0053 for Perl language, used in services running behind an nginx reverse proxy.

Analysis generated by Claude AI (Anthropic) based on NVD data. Always verify with vendor.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Miyagawa Plack\

    APP
    Miyagawa
    \
🔵
CHECK WITH VENDOR
No clear patch data available. Check vendor references.
CWE
References

Related vulnerabilities

CVE-2014-125112CRITICAL9.8PL ✓same product

RCE w Plack::Middleware::Session::Cookie przez niebezpieczną deserializację cookie

CVE-2026-40560HIGH7.5same vendor

Starman versions before 0.4018 for Perl allows HTTP Request Smuggling via Improper Header Precedence. Starman...