Description
The example code for the digest authentication functionality (http_authentication.rb) in Ruby on Rails before 2.3.3 defines an authenticate_or_request_with_http_digest block that returns nil instead of false when the user does not exist, which allows context-dependent attackers to bypass authentication for applications that are derived from this example by sending an invalid username without a password.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | rails | 2.3.5-1 | — |
| Debian 13 | rails | 2.3.5-1 | — |
| Debian 12 | rails | 2.3.5-1 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | rails | < 2.3.3 | 2.3.3 | GHSA-rxq3-gm4p-5fj4 |
References
- 35702 third-party-advisory
- 35579 vdb-entry
- APPLE-SA-2010-03-29-1 vendor-advisory
- http://weblog.rubyonrails.org/2009/6/3/security-problem-with-authenticate_with_http_digest
- ADV-2009-1802 vdb-entry
- http://support.apple.com/kb/HT4077
- http://n8.tumblr.com/post/117477059/security-hole-found-in-rails-2-3s
- rubyonrails-validatedigest-sec-bypass(51528) vdb-entry