Incorrect Behavior Order: Validate Before Canonicalize Affecting rack package, versions <2.2.25>=3.0.0.beta1, <3.1.23>=3.2.0, <3.2.8


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.43% (29th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUBY-RACK-22840116
  • published24 Nov 2026
  • disclosed9 Nov 2026
  • creditthesmartshadow

Introduced: 9 Nov 2026

NewCVE-2026-125110  (opens in a new tab)
CWE-180  (opens in a new tab)

How to fix?

Upgrade rack to version 2.2.25, 3.1.23, 3.2.8 or higher.

Overview

rack is a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call.

Affected versions of this package are vulnerable to Incorrect Behavior Order: Validate Before Canonicalize via the applicable_rules method in Rack::Static. In applications that use path-specific header_rules, an unauthenticated attacker who knows a protected file’s path can request it with raw or percent-encoded dot segments; Rack::Static serves the normalized file without applying the rules for its actual location. The file is served without configured protections such as Content-Disposition: attachment or a restrictive Content Security Policy, so untrusted HTML may render inline.

Notes

  • The configuration gate is Rack::Static using path-specific header_rules for the protected file; applications without those rules are not affected.

Workarounds

  • Reject requests containing dot segments at the reverse proxy or application boundary to block paths that bypass Rack::Static header rules.
  • Serve untrusted uploads from a separate origin instead of relying solely on Rack::Static header_rules to prevent them from rendering inline.

CVSS Base Scores

version 4.0
version 3.1