Race Condition Affecting rack package, versions <2.2.14


Severity

Recommended
0.0
low
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.02% (3rd 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 Learn

Learn about Race Condition vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUBY-RACK-10074188
  • published8 May 2025
  • disclosed7 May 2025
  • creditS. Tokarenko

Introduced: 7 May 2025

NewCVE-2025-32441  (opens in a new tab)
CWE-362  (opens in a new tab)
CWE-613  (opens in a new tab)

How to fix?

Upgrade rack to version 2.2.14 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 Race Condition in Rack::Session::Pool middleware, which allows an attacker to restore and use a deleted session. The attacker must be in possession of a valid session cookie and the attack must be timed to coincide with a disconnection from the long-running session by another user.

Workaround

This vulnerability can be avoided by invalidating sessions using the logged_out flag rather than deleting them, or by enforcing session invalidation by maintaining a custom session store and invalidating based on timestamp as soon as a session is closed.

Note: This vulnerability is addressed for Rack versions 3 and above in rack-session. The vulnerability is tracked by CVE-2025-46336.

CVSS Base Scores

version 4.0
version 3.1