CVE-2021-22885
Description
A possible information disclosure / unintended method execution vulnerability in Action Pack >= 2.0.0 when using the redirect_to or polymorphic_urlhelper with untrusted user input.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Action Pack's `redirect_to` and `polymorphic_url` helpers disclose internal information or execute unintended methods when given untrusted user input, impacting >= 2.0.0.
Vulnerability
A possible information disclosure / unintended method execution vulnerability exists in Action Pack (the Rails controller layer) when using the redirect_to or polymorphic_url helpers with untrusted user input [3]. The vulnerable code pattern passes user-supplied parameters directly to these helpers, e.g., redirect_to(params[:some_param]). All versions of Action Pack from 2.0.0 up to and including 5.2.4.6, 6.0.3.6, and 6.1.3.1 are affected; versions < 2.0.0 are not affected [3].
Exploitation
An attacker needs to supply a specially crafted parameter to an endpoint that calls redirect_to or polymorphic_url with untrusted input. No authentication is required if the endpoint is public. The attacker can control the target argument, potentially triggering method calls on internal objects or exposing sensitive information [3]. The exact mechanism depends on how the helper interprets the input (e.g., as a symbol or hash).
Impact
Successful exploitation can lead to unintended method execution on the server, which may result in information disclosure (e.g., leaking internal details or credentials) or arbitrary method invocation in the context of the application [2][3]. The attacker does not directly gain RCE but can influence program execution paths, potentially leading to further compromise [3].
Mitigation
Fixed versions were released on 2021-05-05: 5.2.4.6, 5.2.6, 6.0.3.7, and 6.1.3.2 [3]. Patches are available for the 5.2, 6.0, and 6.1 series [3]. Workarounds include using an allow list to validate user input or forcing the input to a string via to_s [3]. Users on unsupported releases (< 5.2) should upgrade as soon as possible [3].
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 |
|---|---|---|
actionpackRubyGems | >= 6.0.0, < 6.0.3.7 | 6.0.3.7 |
actionpackRubyGems | >= 6.1.0, < 6.1.3.2 | 6.1.3.2 |
actionpackRubyGems | >= 5.2.5, < 5.2.6 | 5.2.6 |
actionpackRubyGems | >= 2.0.0, < 5.2.4.6 | 5.2.4.6 |
Affected products
13- Action Pack/Action Packdescription
- ghsa-coords12 versionspkg:gem/actionpackpkg:rpm/opensuse/rubygem-actionpack-5_1&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/rubygem-actionpack-5_1&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/rubygem-actionpack-6.0&distro=openSUSE%20Tumbleweedpkg:rpm/suse/rubygem-actionpack-3_2&distro=SUSE%20WebYast%201.3pkg:rpm/suse/rubygem-actionpack-4_2&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/rubygem-actionpack-4_2&distro=SUSE%20OpenStack%20Cloud%20Crowbar%208pkg:rpm/suse/rubygem-actionpack-4_2&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209pkg:rpm/suse/rubygem-actionpack-5_1&distro=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension%2015pkg:rpm/suse/rubygem-actionpack-5_1&distro=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension%2015%20SP1pkg:rpm/suse/rubygem-actionpack-5_1&distro=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension%2015%20SP2pkg:rpm/suse/rubygem-actionpack-5_1&distro=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension%2015%20SP3
>= 6.0.0, < 6.0.3.7+ 11 more
- (no CPE)range: >= 6.0.0, < 6.0.3.7
- (no CPE)range: < 5.1.4-lp152.5.6.1
- (no CPE)range: < 5.1.4-3.9.1
- (no CPE)range: < 6.0.4.4-1.1
- (no CPE)range: < 3.2.12-0.27.3.1
- (no CPE)range: < 4.2.9-7.12.1
- (no CPE)range: < 4.2.9-7.12.1
- (no CPE)range: < 4.2.9-7.12.1
- (no CPE)range: < 5.1.4-3.9.1
- (no CPE)range: < 5.1.4-3.9.1
- (no CPE)range: < 5.1.4-3.9.1
- (no CPE)range: < 5.1.4-3.9.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
8- github.com/advisories/GHSA-hjg4-8q5f-x6fmghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-22885ghsaADVISORY
- www.debian.org/security/2021/dsa-4929mitrevendor-advisoryx_refsource_DEBIAN
- github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22885.ymlghsaWEB
- groups.google.com/g/rubyonrails-security/c/NiQl-48cXYIghsaWEB
- hackerone.com/reports/1106652ghsax_refsource_MISCWEB
- security.netapp.com/advisory/ntap-20210805-0009ghsaWEB
- security.netapp.com/advisory/ntap-20210805-0009/mitrex_refsource_CONFIRM
News mentions
0No linked articles in our index yet.