Junglewise Threat Intelligence

CVE-2026-34763: Rack Rack::Directory information disclosure via unescaped regex interpolation

CVE-2026-34763 · Severity: medium · CVSS 5.3 · Published 2026-04-02

Technologies: Rack.

Executive brief

Rack is a foundational software component used by many Ruby-based web applications to handle web requests. A vulnerability in its directory listing feature can cause the server to accidentally reveal its internal file system structure to any visitor. This exposure of internal paths could help an attacker map out the server's layout, potentially revealing usernames or sensitive deployment details.

Technical details

The vulnerability exists in the Rack::Directory component where the developer-configured 'root' path is interpolated directly into a regular expression without escaping. Specifically, Rack::Directory::DirectoryBody#each uses a regex to strip the root prefix from the absolute path before rendering it to the user. If the root path contains regex metacharacters (such as +, *, or .), the prefix stripping can fail. This results in the full, absolute filesystem path being leaked in the HTML directory listing instead of the relative path. The issue is reachable over the network without authentication if directory listing is enabled. Patches are available in versions 2.2.23, 3.1.21, and 3.2.6.

Affected products

  • Rack Rack < 2.2.23, >= 3.0.0 < 3.1.21, >= 3.2.0 < 3.2.6

Timeline

  • 2026-04-01: advisory: GitHub Security Advisory published by maintainers
  • 2026-04-02: disclosed: CVE published to NVD

References