VYPR
Moderate severityNVD Advisory· Published Feb 27, 2024· Updated Feb 13, 2025

Possible Sensitive Session Information Leak in Active Storage

CVE-2024-26144

Description

Rails is a web-application framework. Starting with version 5.2.0, there is a possible sensitive session information leak in Active Storage. By default, Active Storage sends a Set-Cookie header along with the user's session cookie when serving blobs. It also sets Cache-Control to public. Certain proxies may cache the Set-Cookie, leading to an information leak. The vulnerability is fixed in 7.0.8.1 and 6.1.7.7.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
activestorageRubyGems
>= 5.2.0, < 6.1.7.76.1.7.7
activestorageRubyGems
>= 7.0.0, < 7.0.8.17.0.8.1

Affected products

1

Patches

2
723f54566023

Merge pull request #48869 from brunoprietog/disable-session-active-storage-proxy-controllers

https://github.com/rails/railsRafael Mendonça FrançaAug 3, 2023via ghsa
4 files changed · +22 0
  • activestorage/app/controllers/active_storage/blobs/proxy_controller.rb+1 0 modified
    @@ -9,6 +9,7 @@
     class ActiveStorage::Blobs::ProxyController < ActiveStorage::BaseController
       include ActiveStorage::SetBlob
       include ActiveStorage::Streaming
    +  include ActiveStorage::DisableSession
     
       def show
         if request.headers["Range"].present?
    
  • activestorage/app/controllers/active_storage/representations/proxy_controller.rb+1 0 modified
    @@ -8,6 +8,7 @@
     # {Authenticated Controllers}[https://guides.rubyonrails.org/active_storage_overview.html#authenticated-controllers].
     class ActiveStorage::Representations::ProxyController < ActiveStorage::Representations::BaseController
       include ActiveStorage::Streaming
    +  include ActiveStorage::DisableSession
     
       def show
         http_cache_forever public: true do
    
  • activestorage/app/controllers/concerns/active_storage/disable_session.rb+12 0 added
    @@ -0,0 +1,12 @@
    +# frozen_string_literal: true
    +
    +# This concern disables the session in order to allow caching by default in some CDNs as CloudFlare.
    +module ActiveStorage::DisableSession
    +  extend ActiveSupport::Concern
    +
    +  included do
    +    before_action do
    +      request.session_options[:skip] = true
    +    end
    +  end
    +end
    
  • activestorage/CHANGELOG.md+8 0 modified
    @@ -1,3 +1,11 @@
    +*   Disables the session in `ActiveStorage::Blobs::ProxyController`
    +    and `ActiveStorage::Representations::ProxyController`
    +    in order to allow caching by default in some CDNs as CloudFlare
    +
    +    Fixes #44136
    +
    +    *Bruno Prieto*
    +
     ## Rails 7.0.8 (September 09, 2023) ##
     
     *   No changes.
    
78fe149509fa

Merge pull request #48869 from brunoprietog/disable-session-active-storage-proxy-controllers

https://github.com/rails/railsRafael Mendonça FrançaAug 3, 2023via ghsa
4 files changed · +22 0
  • activestorage/app/controllers/active_storage/blobs/proxy_controller.rb+1 0 modified
    @@ -4,6 +4,7 @@
     class ActiveStorage::Blobs::ProxyController < ActiveStorage::BaseController
       include ActiveStorage::SetBlob
       include ActiveStorage::SetHeaders
    +  include ActiveStorage::DisableSession
     
       def show
         http_cache_forever public: true do
    
  • activestorage/app/controllers/active_storage/representations/proxy_controller.rb+1 0 modified
    @@ -3,6 +3,7 @@
     # Proxy files through application. This avoids having a redirect and makes files easier to cache.
     class ActiveStorage::Representations::ProxyController < ActiveStorage::Representations::BaseController
       include ActiveStorage::SetHeaders
    +  include ActiveStorage::DisableSession
     
       def show
         http_cache_forever public: true do
    
  • activestorage/app/controllers/concerns/active_storage/disable_session.rb+12 0 added
    @@ -0,0 +1,12 @@
    +# frozen_string_literal: true
    +
    +# This concern disables the session in order to allow caching by default in some CDNs as CloudFlare.
    +module ActiveStorage::DisableSession
    +  extend ActiveSupport::Concern
    +
    +  included do
    +    before_action do
    +      request.session_options[:skip] = true
    +    end
    +  end
    +end
    
  • activestorage/CHANGELOG.md+8 0 modified
    @@ -1,3 +1,11 @@
    +*   Disables the session in `ActiveStorage::Blobs::ProxyController`
    +    and `ActiveStorage::Representations::ProxyController`
    +    in order to allow caching by default in some CDNs as CloudFlare
    +
    +    Fixes #44136
    +
    +    *Bruno Prieto*
    +
     ## Rails 6.1.7.6 (August 22, 2023) ##
     
     *   No changes.
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

10

News mentions

0

No linked articles in our index yet.