CVE-2026-142593: 
Ruby Analyse et atténuation de la vulnérabilité

Aperçu

CVE-2026-142593 is a path traversal vulnerability in Rack::Directory that allows unauthenticated attackers to enumerate directory contents outside the web root by exploiting symbolic links combined with dot-dot (..) path segments. It affects the Rack Ruby web server interface from versions 2.2.0 through 2.2.25, 3.0.0 through 3.1.23, and 3.2.0 through 3.2.8. The vulnerability was published on December 2, 2026, and patched versions were tagged on November 20, 2026. It carries a CVSS v3.1 base score of 5.3 (Medium) (GitHub Advisory, Feedly).

Détails techniques

The root cause is a TOCTOU-style inconsistency in Rack::Directory#get (CWE-22, CWE-59): the method validates the request path using File.expand_path (a lexical, symlink-unaware check), but then passes the original unnormalized path to File.stat and Dir.foreach. When a directory under the served root is a symbolic link, the OS resolves the symlink before applying the trailing .., causing the filesystem to traverse outside the root. For example, with public/system symlinked to shared/system, a request for /system/../ passes the security check (lexically resolving to public/) but the OS evaluates it as shared/, exposing the parent of the symlink target. Percent-encoded variants such as %2E%2E are equally effective. The fix applies Utils.clean_path_info to normalize the path before any filesystem access, consistent with how Rack::Files already operates (GitHub Advisory, Patch Commit).

Impact

Successful exploitation allows an unauthenticated remote attacker to enumerate directory entry names, file sizes, and modification times for directories outside the web root — but file contents are not readable, as Rack::Files normalizes paths before serving content. In common Capistrano-style deployments where public/system, public/uploads, or public/assets are symlinked into a shared directory, an attacker can discover sensitive filenames such as config/database.yml or config/master.key, and can chain further traversal through any additional symlinks discovered in listings. This information disclosure aids reconnaissance and can facilitate follow-on attacks (GitHub Advisory).

Exploitabilité

No public proof-of-concept exploit code or in-the-wild exploitation has been reported as of the disclosure date. The vulnerability requires no authentication, no special privileges, and no user interaction — a simple HTTP GET request with a crafted path is sufficient. The EPSS score is 0.0, and the CVE is not listed in the CISA Known Exploited Vulnerabilities catalog. The attack is low-complexity and network-accessible, making it straightforward to attempt against any exposed Rack::Directory instance with symlinked subdirectories (Feedly, GitHub Advisory).

Étapes d’exploitation

  1. Reconnaissance: Identify web applications using Rack (Ruby on Rails, Sinatra, Rackup, etc.) that expose Rack::Directory for directory browsing, particularly those using Capistrano-style deployments with symlinked directories (e.g., public/system → shared/system).
  2. Confirm symlink presence: Browse to the served root (e.g., GET /) and look for directory listings that include symlinked directories such as /system/, /uploads/, or /assets/.
  3. Craft traversal request: Send an HTTP GET request appending /../ after the symlinked directory name, e.g., GET /system/../ or using percent-encoding GET /system/%2E%2E/.
  4. Enumerate parent directory: The response will contain a directory listing of the symlink target's parent (e.g., shared/), revealing filenames, sizes, and modification times of files outside the web root.
  5. Traverse further: Use any additional symlinks discovered in the listing to repeat the traversal, or navigate to sibling directories (e.g., GET /system/../config/) to enumerate sensitive configuration directories.
  6. Collect intelligence: Record discovered filenames (e.g., database.yml, master.key, log files, PID files) for use in further targeted attacks (GitHub Advisory, Patch Commit).

Indicateurs de compromis

  • Network: HTTP GET requests to paths containing /../ or /%2E%2E/ following a directory name (e.g., /system/../, /uploads/%2E%2E/config/); repeated directory listing requests to paths outside the expected web root structure.
  • Logs: Web server access logs showing 200 OK responses to requests with .. or %2E%2E segments in the path, particularly following known symlinked directory names; unusual directory listing responses for paths that should not exist under the web root.
  • File System: No file system artifacts are created by this read-only directory enumeration attack; however, presence of symlinked directories under the web root (e.g., public/system → shared/system) constitutes a precondition indicator.

Atténuation et solutions de contournement

Upgrade Rack to a patched version: 2.2.26, 3.1.24, or 3.2.9, which normalize the request path with Utils.clean_path_info before any filesystem access (GitHub Releases, GitHub Advisory). If immediate upgrade is not possible, consider the following workarounds: (1) avoid placing symbolic links to directories under any root served by Rack::Directory; (2) avoid exposing Rack::Directory to untrusted clients; (3) configure a reverse proxy (e.g., nginx) to reject request paths containing .. or %2E%2E segments before they reach the Rack application.

Ressources supplémentaires


Source: Ce rapport a été généré à l’aide de l’IA

Connexe Ruby Vulnérabilités :

CVE ID

Gravité

Partition

Technologies

Nom du composant

Exploit CISA KEV

A corrigé

Date de publication

CVE-2026-142592HIGH7.5
  • Ruby logoRuby
  • rack
NonOuiDec 02, 2026
CVE-2026-142593MEDIUM5.3
  • Ruby logoRuby
  • rack
NonOuiDec 02, 2026
GHSA-frgv-948x-h96gMEDIUM4.8
  • Ruby logoRuby
  • rack
NonOuiDec 02, 2026
GHSA-r243-pfwh-7rpxLOW3.7
  • Ruby logoRuby
  • rack
NonOuiDec 03, 2026
CVE-2026-142594LOW3.7
  • Ruby logoRuby
  • rack
NonOuiDec 02, 2026

Évaluation gratuite des vulnérabilités

Évaluez votre posture de sécurité cloud

Évaluez vos pratiques de sécurité cloud dans 9 domaines de sécurité afin d’évaluer votre niveau de risque et d’identifier les lacunes dans vos défenses.

Évaluation de la demande

Ressources Wiz supplémentaires

Obtenez une démo personnalisée

Prêt(e) à voir Wiz en action ?

"La meilleure expérience utilisateur que j’ai jamais vue, offre une visibilité totale sur les workloads cloud."
David EstlickRSSI
"Wiz fournit une interface unique pour voir ce qui se passe dans nos environnements cloud."
Adam FletcherChef du service de sécurité
"Nous savons que si Wiz identifie quelque chose comme critique, c’est qu’il l’est réellement."
Greg PoniatowskiResponsable de la gestion des menaces et des vulnérabilités