7.5high
Rack has a Directory Traversal via Rack:Directory
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.78% (higher than 57% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-mxw3-3hh2-x2mh
Description
Rack is a modular Ruby web server interface. Prior to versions 2.2.22, 3.1.20, and 3.2.5, `Rack::Directory`’s path check used a string prefix match on the expanded path. A request like `/../root_example/` can escape the configured root if the target path starts with the root string, allowing directory listing outside the intended root. Versions 2.2.22, 3.1.20, and 3.2.5 fix the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| rack rack | < 2.2.22, >= 3.0.0.beta1, < 3.1.20, >= 3.2.0, < 3.2.5, before 2.2.22, from 3.0.0 before 3.1.20, from 3.2.0 before 3.2.5 | CVE List, NVD |
| openshift-logging/cluster-logging-operator-bundle | Not specified | CVE List |
| openshift-logging/cluster-logging-rhel9-operator | Not specified | CVE List |
| openshift-logging/eventrouter-rhel9 | Not specified | CVE List |
| openshift-logging/fluentd-rhel9 | Not specified | CVE List |
| openshift-logging/log-file-metric-exporter-rhel9 | Not specified | CVE List |
| openshift-logging/logging-view-plugin-rhel9 | Not specified | CVE List |
| openshift-logging/vector-rhel9 | Not specified | CVE List |
| 3scale-amp20/backend | Not specified | CVE List |
| 3scale-amp20/system | Not specified | CVE List |
| 3scale-amp21/backend | Not specified | CVE List |
| 3scale-amp21/system | Not specified | CVE List |
| 3scale-amp21/zync | Not specified | CVE List |
| 3scale-amp22/backend | Not specified | CVE List |
| 3scale-amp22/system | Not specified | CVE List |
| 3scale-amp22/zync | Not specified | CVE List |
| 3scale-amp24/backend | Not specified | CVE List |
| 3scale-amp24/system | Not specified | CVE List |
| 3scale-amp24/zync | Not specified | CVE List |
| 3scale-amp25/backend | Not specified | CVE List |
| 3scale-amp25/system | Not specified | CVE List |
| 3scale-amp25/zync | Not specified | CVE List |
| 3scale-amp26/backend | Not specified | CVE List |
| 3scale-amp26/system | Not specified | CVE List |
| 3scale-amp26/zync | Not specified | CVE List |
| 3scale-amp2/backend-rhel7 | Not specified | CVE List |
| 3scale-amp2/backend-rhel8 | Not specified | CVE List |
| 3scale-amp2/system-rhel7 | Not specified | CVE List |
| 3scale-amp2/system-rhel8 | Not specified | CVE List |
| 3scale-amp2/system-rhel9 | Not specified | CVE List |
| 3scale-amp2/zync-rhel7 | Not specified | CVE List |
| 3scale-amp2/zync-rhel8 | Not specified | CVE List |
| 3scale-amp2/zync-rhel9 | Not specified | CVE List |
| pcs | Not specified | CVE List |
| rack (RubyGems) | before 2.2.22, from 3.0.0.beta1 before 3.1.20, from 3.2.0 before 3.2.5 | GitHub Advisory Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| redhat-SADP | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
What each source says
CVE List
Rack is a modular Ruby web server interface. Prior to versions 2.2.22, 3.1.20, and 3.2.5, `Rack::Directory`’s path check used a string prefix match on the expanded path. A request like `/../root_example/` can escape the configured root if the target path starts with the root string, allowing directory listing outside the intended root. Versions 2.2.22, 3.1.20, and 3.2.5 fix the issue.
GitHub Advisory Database
Summary
Rack::Directory’s path check used a string prefix match on the expanded path. A request like /../root_example/ can escape the configured root if the target path starts with the root string, allowing directory listing outside the intended root.
Details
In directory.rb, File.expand_path(File.join(root, path_info)).start_with?(root) does not enforce a path boundary. If the server root is /var/www/root, a path like /var/www/root_backup passes the check because it shares the same prefix, so Rack::Directory will list that directory also.
Impact
Information disclosure via directory listing outside the configured root when Rack::Directory is exposed to untrusted clients and a directory shares the root prefix (e.g., public2, www_backup).
Mitigation
- Update to a patched version of Rack that correctly checks the root prefix.
- Don't name directories with the same prefix as one which is exposed via
Rack::Directory.
NVD (es)
Rack es una interfaz modular de servidor web Ruby. Antes de las versiones 2.2.22, 3.1.20 y 3.2.5, la verificación de ruta de 'Rack::Directory' utilizaba una coincidencia de prefijo de cadena en la ruta expandida. Una solicitud como '/../root_example/' puede escapar de la raíz configurada si la ruta de destino comienza con la cadena raíz, permitiendo la enumeración de directorios fuera de la raíz prevista. Las versiones 2.2.22, 3.1.20 y 3.2.5 solucionan el problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-22860 changed 2026-07-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mxw3-3hh2-x2mh changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-22860 changed 2026-07-15 | Public domain |