Skip to content

GHSA-8h22-8cf7-hq6g BIT-rails-2024-26144 CVE-2024-26144

Rails has possible Sensitive Session Information Leak in Active Storage

Medium RubyGems
Severity
5.3 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
1.12%
Chance of exploitation in the next 30 days. Higher than 66.16% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
Fix
6.1.7.7
Upgrade activestorage to this version or later

Description

Possible Sensitive Session Information Leak in Active Storage

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.

This vulnerability has been assigned the CVE identifier CVE-2024-26144.

Versions Affected: >= 5.2.0, < 7.1.0 Not affected: < 5.2.0, > 7.1.0 Fixed Versions: 7.0.8.1, 6.1.7.7

Impact

A proxy which chooses to caches this request can cause users to share sessions. This may include a user receiving an attacker's session or vice versa.

This was patched in 7.1.0 but not previously identified as a security vulnerability.

All users running an affected release should either upgrade or use one of the workarounds immediately.

Releases

The fixed releases are available at the normal locations.

Workarounds

Upgrade to Rails 7.1.X, or configure caching proxies not to cache the Set-Cookie headers.

Credits

Thanks to tyage for reporting this!

Affected versions

RubyGems

PackageVulnerableFixed in
activestorage
>= 5.2.0, < 6.1.7.7
6.1.7.7
activestorage
>= 7.0.0, < 7.0.8.1
7.0.8.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

activestorage RubyGems → 6.1.7.7

bundler
bundle update activestorage # Gemfile: gem "activestorage", ">= 6.1.7.7"

Severity breakdown

CVSS 3.1 5.3

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

Weakness

CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.

How to prevent it
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-xr9x-r78c-5hrm
Active Storage has possible arbitrary file read and remote code execution in Active Storage variant processing
Critical Also affects activestorage
GHSA-p9fm-f462-ggrg
Rails Active Storage has a possible DoS vulnerability in proxy mode via multi-range requests
Medium Also affects activestorage
GHSA-73f9-jhhh-hr5m
Rails Active Storage has possible glob injection in its DiskService
Critical Also affects activestorage
GHSA-9xrj-h377-fr87
Rails Active Storage has possible Path Traversal in DiskService
Critical Also affects activestorage
GHSA-r46p-8f7g-vvvg
Rails Active Storage has a possible DoS vulnerability when in proxy mode via Range requests
High Also affects activestorage
GHSA-qcfx-2mfw-w4cg
Rails Active Storage has possible content type bypass via metadata in direct uploads
Medium Also affects activestorage
GHSA-r4mg-4433-c7g3
Active Storage allowed transformation methods that were potentially unsafe
High Also affects activestorage
GHSA-w749-p3v6-hccq
Possible code injection vulnerability in Rails / Active Storage
Critical Also affects activestorage
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor