UBUNTU-CVE-2026-34785: High severity ubuntu/ruby-rack vulnerability
Rack is a modular Ruby web server interface. Prior to versions 2.2.23, 3.1.21, and 3.2.6, Rack::Static determines whether a request should be served as a static file using a simple string prefix check. When configured with URL prefixes such as "/css", it matches any request path that begins with that string, including unrelated paths such as "/css-config.env" or "/css-backup.sql". As a result, files under the static root whose names merely share the configured prefix may be served unintentionally, leading to information disclosure. This issue has been patched in versions 2.2.23, 3.1.21, and 3.2.6.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/ruby-rackto a version that resolves this vulnerability.Fixed in 1.5.2-3+deb8u3ubuntu1~esm11 - Upgrade
Upgrade
ubuntu/ruby-rackto a version that resolves this vulnerability.Fixed in 1.6.4-3ubuntu0.2+esm10 - Upgrade
Upgrade
ubuntu/ruby-rackto a version that resolves this vulnerability.Fixed in 1.6.4-4ubuntu0.2+esm10 - Upgrade
Upgrade
ubuntu/ruby-rackto a version that resolves this vulnerability.Fixed in 2.1.4-5ubuntu1.2+esm3 - Upgrade
Upgrade
ubuntu/ruby-rackto a version that resolves this vulnerability.Fixed in 2.2.7-1ubuntu0.7 - Upgrade
Upgrade
ubuntu/ruby-rackto a version that resolves this vulnerability.Fixed in 3.1.16-0.1ubuntu0.3 - Upgrade
Upgrade
Rack::Staticto a version that resolves this vulnerability.Fixed in 2.2.23
Event History
Frequently Asked Questions
Which deployments are exposed to unintended file disclosure?
Deployments using Rack::Static with a configured URL prefix such as "/css" are exposed if files beneath the static root have names beginning with that prefix but are not intended to be served. Examples include paths such as "/css-config.env" and "/css-backup.sql".
What does an attacker need to exploit this issue?
An attacker can exploit the issue remotely without authentication or user interaction by requesting a path that begins with a configured static URL prefix. Disclosure depends on a matching file being present under the static root.
Which Rack versions contain the fix?
The issue is patched in Rack versions 2.2.23, 3.1.21, and 3.2.6. Versions before those releases in their respective branches are affected.
What can be done before updating Rack?
Review Rack::Static URL-prefix configuration and the files under the static root. Remove or relocate sensitive files whose names begin with configured prefixes, or adjust the static-file configuration so unintended paths are not served.