Loading...
Skip to main content

CVE-2020-8165 — Vulnerability in activesupport — CVE Details

CRITICAL

ActiveSupport potentially unintended unmarshalling of user-provided objects in MemCacheStore and RedisCacheStore

Published May 26, 2020Updated May 9, 2025Source: osv

Summary

In ActiveSupport, there is potentially unexpected behaviour in the MemCacheStore and RedisCacheStore where, when untrusted user input is written to the cache store using the `raw: true` parameter, re-reading the result from the cache can evaluate the user input as a Marshalled object instead of plain text. Vulnerable code looks like: ``` data = cache.fetch("demo", raw: true) { untrusted_string } ``` Versions Affected: rails < 5.2.5, rails < 6.0.4 Not affected: Applications not using MemCacheStore or RedisCacheStore. Applications that do not use the `raw` option when storing untrusted user input. Fixed Versions: rails >= 5.2.4.3, rails >= 6.0.3.1 Impact ------ Unmarshalling of untrusted user input can have impact up to and including RCE. At a minimum, this vulnerability allows an attacker to inject untrusted Ruby objects into a web application. In addition to upgrading to the latest versions of Rails, developers should ensure that whenever they are calling `Rails.cache.fetch` they are using consistent values of the `raw` parameter for both reading and writing, especially in the case of the RedisCacheStore which does not, prior to these changes, detect if data was serialized using the raw option upon deserialization. Workarounds ----------- It is recommended that application developers apply the suggested patch or upgrade to the latest release as soon as possible. If this is not possible, we recommend ensuring that all user-provided strings cached using the `raw` argument should be double-checked to ensure that they conform to the expected format.

Advisory Timeline

  • First published May 26, 2020 (2330 days ago).
  • Last revised May 9, 2025 — 1809 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update activesupport to 5.2.4.3 or later
gem install activesupport -v 5.2.4.3
Bundler
Update activesupport to 6.0.3.1 or later
gem install activesupport -v 6.0.3.1

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
activesupport
rubygems
5.0.0, 5.0.0.1, 5.0.1, 5.0.1.rc1 (+51 more)5.2.4.3
activesupport
rubygems
6.0.0, 6.0.1, 6.0.1.rc1, 6.0.2 (+6 more)6.0.3.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-502
    Deserialization of Untrusted DataMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Frequently Asked Questions

What is CVE-2020-8165?
ActiveSupport potentially unintended unmarshalling of user-provided objects in MemCacheStore and RedisCacheStore This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2020-8165?
CVE-2020-8165 affects activesupport. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2020-8165 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-2p68-f74v-9wc6

Related CVEs

  • CVE-2026-55107
    CRITICAL

    kobako Sandbox Escape: guest eval reaches host RCE via method_missing → public_send (any bound Service)

  • CVE-2026-77602
    CRITICAL

    OpenC3 COSMOS: Authenticated remote code execution via the user-writable config overlay (table definitions, cmd/tlm definitions, and script suites)

  • CVE-2026-33176
    MEDIUM

    Rails Active Support has a possible DoS vulnerability in its number helpers

  • CVE-2026-33170
    MEDIUM

    Rails Active Support has a possible XSS vulnerability in SafeBuffer#%

  • CVE-2026-33169
    MEDIUM

    Rails Active Support has a possible ReDoS vulnerability in number_to_delimited

  • CVE-2023-38037
    MEDIUM

    Active Support Possibly Discloses Locally Encrypted Files

  • CVE-2023-28120
    MEDIUM

    Possible XSS Security Vulnerability in SafeBuffer#bytesplice

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies