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

Aperçu

CVE-2026-142592 is a denial-of-service vulnerability in Rack's multipart parser caused by uncontrolled resource consumption (CWE-400) when processing unknown charset parameters. Affecting Rack versions 3.0.0 through 3.1.23 and 3.2.0 through 3.2.8, the flaw allows an unauthenticated remote attacker to exhaust CPU resources by sending crafted multipart requests containing thousands of unknown charset values. The vulnerability was disclosed on November 20, 2026, with patches released the same day. It carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory).

Détails techniques

The root cause lies in Rack::Multipart::Parser#tag_multipart_encoding, which calls Encoding.find for every charset parameter in a multipart part's Content-Type header without first checking Encoding.name_list. When an unknown encoding name is supplied, Ruby's Encoding.find internally calls load_encoding, which searches every directory on $LOAD_PATH for a matching .so file before raising ArgumentError. Rack rescues this exception and falls back to binary encoding, but critically does not cache the failure or limit the number of charset parameters per part. The attack vector is network-based with no authentication, privileges, or user interaction required. The cost per lookup scales with the application's load path size — approximately 30 µs on bare Ruby, ~500 µs in a Bundler application with 200 load-path entries, and ~2.5 ms on Linux with 167 entries — meaning a single 64 KB part with 4,000 unknown charset parameters can take ~1.7 seconds to parse, and a 1 MB request with 16 such parts can take 27–40 seconds (GitHub Advisory, Patch Commit 3.1.x).

Impact

Successful exploitation causes availability degradation or complete denial of service for any application that parses multipart bodies via Rack::Request#POST or #params. In a default Rails application, a POST to any path — including unrouted ones — is sufficient because Rack::MethodOverride parses the body before routing occurs. Four concurrent 1 MB malicious requests were demonstrated to delay an unrelated health-check endpoint by over 10 seconds, and concurrent requests can exhaust the entire Puma thread pool. There is no confidentiality or integrity impact; the vulnerability is purely an availability concern (GitHub Advisory).

Exploitabilité

No public proof-of-concept exploit code or in-the-wild exploitation has been reported as of the disclosure date. The EPSS score is 0.0, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (Feedly). However, the attack is trivially constructable — it requires only a crafted HTTP multipart request with no authentication — making it low-complexity and accessible to any unauthenticated network attacker. No threat actor attribution has been identified.

Étapes d’exploitation

  1. Identify target: Locate a Ruby web application using Rack 3.0.0–3.1.23 or 3.2.0–3.2.8 that accepts multipart form submissions (e.g., any Rails app with a POST endpoint, or even unrouted paths due to Rack::MethodOverride).
  2. Craft malicious multipart request: Construct a multipart HTTP POST request containing a single part whose Content-Type header includes thousands of unknown charset parameters, e.g.:
Content-Type: text/plain; charset=fake1; charset=fake2; charset=fake3; ...

Each unknown charset name costs ~10 bytes, so ~4,000 parameters fit in 64 KB. 3. Send the request: Transmit the crafted request to any endpoint that triggers multipart parsing. In Rails, this includes any POST path, even one with no defined route. 4. Repeat concurrently: Send multiple such requests simultaneously (e.g., 4 concurrent 1 MB requests) to exhaust the application's worker thread pool, causing denial of service for all legitimate users. 5. Scale the attack: Increase request size up to the 1 MB buffer limit (~16 parts × 4,000 charset parameters = ~1.6 million load-path lookups per request), extending parse time to 27–40 seconds per request (GitHub Advisory).

Indicateurs de compromis

  • Network: High volume of multipart POST requests (especially to unrouted or generic paths) with unusually large Content-Type headers containing repeated charset= parameters; requests sized 64 KB–1 MB with minimal body content.
  • Logs: Web server access logs showing POST requests with abnormally long Content-Type header values; requests that take tens of seconds to complete without corresponding large response payloads; elevated request processing times in application performance monitoring.
  • Process: Sustained high CPU utilization on Ruby worker processes (e.g., Puma workers) without corresponding legitimate traffic load; worker threads blocked for 10+ seconds on multipart parsing operations.
  • Application: Health check endpoints or other lightweight routes experiencing unexpected latency or timeouts coinciding with multipart POST traffic spikes (GitHub Advisory).

Atténuation et solutions de contournement

Upgrade Rack to version 3.1.24 or 3.2.9, which fix the issue by pre-computing a frozen set of known encoding names (Encoding.name_list) and only calling Encoding.find when the charset is in that set — unknown charsets are mapped directly to binary without any load-path search (Rack v3.1.24 Release, Rack v3.2.9 Release). As a temporary workaround at the reverse proxy layer, limit the maximum size of multipart request headers and reject requests whose part headers contain many repeated charset parameters. Note that Rack 2.2 is not affected because it aborts parsing on the first unknown charset rather than continuing.

Réactions de la communauté

The advisory was submitted with AI assistance and credited to reporter wtn, remediation developer miguelhmp, and remediation reviewer samuel-williams-shopify (Samuel Williams of Shopify). The advisory was published by samuel-williams-shopify on November 20, 2026 (GitHub Advisory). No significant broader media coverage or notable community commentary beyond the official advisory has been identified at this time.

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