Rack is a modular Ruby web server interface. Prior to versions 2.2.23, 3.1.21, and 3.2.6, Rack::Directory interpolates the configured root path directly into a regular expression when deriving the displayed directory path. If root contains regex metacharacters such as +, *, or ., the prefix stripping can fail and the generated directory listing may expose the full filesystem path in the HTML output. This issue has been patched in versions 2.2.23, 3.1.21, and 3.2.6.
The product uses a regular expression that does not sufficiently restrict the set of allowed values.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Rack | Rack | * | 2.2.23 (excluding) |
| Rack | Rack | 3.0.0 (including) | 3.1.21 (excluding) |
| Rack | Rack | 3.2.0 (including) | 3.2.6 (excluding) |
| Ruby-rack | Ubuntu | devel | * |
| Ruby-rack | Ubuntu | esm-apps-legacy/xenial | * |
| Ruby-rack | Ubuntu | esm-apps/bionic | * |
| Ruby-rack | Ubuntu | esm-apps/focal | * |
| Ruby-rack | Ubuntu | esm-apps/jammy | * |
| Ruby-rack | Ubuntu | esm-apps/xenial | * |
| Ruby-rack | Ubuntu | esm-infra-legacy/trusty | * |
| Ruby-rack | Ubuntu | jammy | * |
| Ruby-rack | Ubuntu | noble | * |
| Ruby-rack | Ubuntu | questing | * |
| Ruby-rack | Ubuntu | resolute | * |
This effectively causes the regexp to accept substrings that match the pattern, which produces a partial comparison to the target. In some cases, this can lead to other weaknesses. Common errors include: