CVE-2026-22860
JSON

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 packageVersionsReported 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.5CVE List, NVD
openshift-logging/cluster-logging-operator-bundleNot specifiedCVE List
openshift-logging/cluster-logging-rhel9-operatorNot specifiedCVE List
openshift-logging/eventrouter-rhel9Not specifiedCVE List
openshift-logging/fluentd-rhel9Not specifiedCVE List
openshift-logging/log-file-metric-exporter-rhel9Not specifiedCVE List
openshift-logging/logging-view-plugin-rhel9Not specifiedCVE List
openshift-logging/vector-rhel9Not specifiedCVE List
3scale-amp20/backendNot specifiedCVE List
3scale-amp20/systemNot specifiedCVE List
3scale-amp21/backendNot specifiedCVE List
3scale-amp21/systemNot specifiedCVE List

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
redhat-SADP7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-22CWE-548

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

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

SourceRecordLicence
CVE ListCVE-2026-22860 changed 2026-07-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-mxw3-3hh2-x2mh changed 2026-09-10CC-BY-4.0
NVDCVE-2026-22860 changed 2026-07-15Public domain