CVE-2020-8165
Description
A deserialization of untrusted data vulnernerability exists in rails < 5.2.4.3, rails < 6.0.3.1 that can allow an attacker to unmarshal user-provided objects in MemCacheStore and RedisCacheStore potentially resulting in an RCE.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Unsafe deserialization in Rails MemCacheStore and RedisCacheStore via raw:true allows RCE when caching untrusted user data.
CVE-2020-8165 describes a deserialization of untrusted data vulnerability in the ActiveSupport cache stores of Ruby on Rails. The bug affects Rails versions prior to 5.2.4.3 and 6.0.3.1, specifically the MemCacheStore and RedisCacheStore implementations [2]. The root cause is that when untrusted user input is written to the cache using the raw: true parameter, the stored data is later deserialized using Ruby's Marshal.load without proper validation, leading to potential unintended unmarshalling of user-provided objects [2].
Exploitation requires an attacker to supply a crafted string that, when cached via a vulnerable call such as Rails.cache.fetch('demo', raw: true) { untrusted_string }, becomes a serialized malicious object [2]. The attack vector is limited to applications that write untrusted input to the cache with the raw option enabled, but no additional authentication or network position is required beyond the ability to provide the malicious payload to the caching call [2]. The vulnerability is especially concerning for the RedisCacheStore, which did not detect whether data was serialized using the raw option upon deserialization prior to the fix [2].
Successful exploitation can allow an attacker to inject arbitrary Ruby objects into the application's cache, which, upon deserialization, can lead to remote code execution (RCE) [2]. At a minimum, the attacker can inject untrusted Ruby objects, potentially leading to further compromise of the application and server [2].
The official fix was released in Rails versions 5.2.4.3 and 6.0.3.1 [2]. Developers unable to immediately upgrade are advised to ensure that all user-provided strings cached with the raw argument are validated to conform to expected formats [2]. The Ruby Advisory Database also tracks this issue as a security advisory for the activesupport gem [3]. No evidence of active exploitation in the wild (KEV) is indicated in the provided references.
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
activesupportRubyGems | >= 5.0.0, < 5.2.4.3 | 5.2.4.3 |
activesupportRubyGems | >= 6.0.0, < 6.0.3.1 | 6.0.3.1 |
Affected products
22- rails/railsdescription
- ghsa-coords21 versionspkg:gem/activesupportpkg:rpm/opensuse/rmt-server&distro=openSUSE%20Leap%2015.1pkg:rpm/opensuse/rmt-server&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/rmt-server&distro=openSUSE%20Tumbleweedpkg:rpm/opensuse/rubygem-activesupport-5_1&distro=openSUSE%20Leap%2015.1pkg:rpm/opensuse/rubygem-activesupport-5_1&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/rubygem-activesupport-6.0&distro=openSUSE%20Tumbleweedpkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-ESPOSpkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-LTSSpkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP1pkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP2pkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015%20SP1pkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015%20SP2pkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20Server%2015-LTSSpkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015pkg:rpm/suse/rubygem-activesupport-4_2&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/rubygem-activesupport-4_2&distro=SUSE%20OpenStack%20Cloud%20Crowbar%208pkg:rpm/suse/rubygem-activesupport-4_2&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209pkg:rpm/suse/rubygem-activesupport-5_1&distro=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension%2015pkg:rpm/suse/rubygem-activesupport-5_1&distro=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension%2015%20SP1pkg:rpm/suse/rubygem-activesupport-5_1&distro=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension%2015%20SP2
>= 5.0.0, < 5.2.4.3+ 20 more
- (no CPE)range: >= 5.0.0, < 5.2.4.3
- (no CPE)range: < 2.6.5-lp151.2.18.2
- (no CPE)range: < 2.6.5-lp152.2.3.1
- (no CPE)range: < 2.6.13-1.1
- (no CPE)range: < 5.1.4-lp151.3.3.1
- (no CPE)range: < 5.1.4-lp152.4.3.1
- (no CPE)range: < 6.0.4.4-1.1
- (no CPE)range: < 2.6.5-3.34.1
- (no CPE)range: < 2.6.5-3.34.1
- (no CPE)range: < 2.6.5-3.18.1
- (no CPE)range: < 2.6.5-3.3.1
- (no CPE)range: < 2.6.5-3.18.1
- (no CPE)range: < 2.6.5-3.3.1
- (no CPE)range: < 2.6.5-3.34.1
- (no CPE)range: < 2.6.5-3.34.1
- (no CPE)range: < 4.2.9-7.9.1
- (no CPE)range: < 4.2.9-7.9.1
- (no CPE)range: < 4.2.9-7.9.1
- (no CPE)range: < 5.1.4-3.3.1
- (no CPE)range: < 5.1.4-3.3.1
- (no CPE)range: < 5.1.4-3.3.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
14- lists.opensuse.org/opensuse-security-announce/2020-10/msg00031.htmlghsavendor-advisoryx_refsource_SUSEWEB
- lists.opensuse.org/opensuse-security-announce/2020-10/msg00034.htmlghsavendor-advisoryx_refsource_SUSEWEB
- github.com/advisories/GHSA-2p68-f74v-9wc6ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2020-8165ghsaADVISORY
- www.debian.org/security/2020/dsa-4766ghsavendor-advisoryx_refsource_DEBIANWEB
- github.com/rubysec/ruby-advisory-db/blob/master/gems/activesupport/CVE-2020-8165.ymlghsaWEB
- groups.google.com/forum/ghsaWEB
- groups.google.com/g/rubyonrails-security/c/bv6fW4S0Y1cghsax_refsource_MISCWEB
- hackerone.com/reports/413388ghsax_refsource_MISCWEB
- lists.debian.org/debian-lts-announce/2020/06/msg00022.htmlghsamailing-listx_refsource_MLISTWEB
- lists.debian.org/debian-lts-announce/2020/07/msg00013.htmlghsamailing-listx_refsource_MLISTWEB
- security.netapp.com/advisory/ntap-20250509-0002ghsaWEB
- weblog.rubyonrails.org/2020/5/18/Rails-5-2-4-3-and-6-0-3-1-have-been-releasedghsaWEB
- weblog.rubyonrails.org/2020/5/18/Rails-5-2-4-3-and-6-0-3-1-have-been-released/mitrex_refsource_CONFIRM
News mentions
0No linked articles in our index yet.