Actionpack has possible cross-site scripting vulnerability via User Supplied Values to redirect_to
Published 29 Jun 2023 · Updated 5 May 2025
Is your project on an affected actionpack?
Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- <6.1.7.4
- Fixed in
- 6.1.7.4
bundle update --conservative actionpack # Gemfile: '>= 6.1.7.4'- Affected
- >=7.0.0 <7.0.5.1
- Fixed in
- 7.0.5.1
bundle update --conservative actionpack # Gemfile: '>= 7.0.5.1'Details
The redirect_to method in Rails allows provided values to contain characters which are not legal in an HTTP header value. This results in the potential for downstream services which enforce RFC compliance on HTTP response headers to remove the assigned Location header. This vulnerability has been assigned the CVE identifier CVE-2023-28362.
Versions Affected: All. Not affected: None Fixed Versions: 7.0.5.1, 6.1.7.4
Impact
This introduces the potential for a Cross-site-scripting (XSS) payload to be delivered on the now static redirection page. Note that this both requires user interaction and for a Rails app to be configured to allow redirects to external hosts (defaults to false in Rails >= 7.0.x).
Releases
The FIXED releases are available at the normal locations.
Workarounds
Avoid providing user supplied URLs with arbitrary schemes to the redirect_to method.
Is GHSA-4g8v-vg43-wpgf in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected actionpack, and gives you the command that fixes it.
More advisories for actionpack
- MediumCVE-2026-126072Action Pack: Possible DoS vulnerability in Action Controller Live streaming · 12 Nov 2026
- MediumCVE-2026-126077Action Pack: Possible sensitive session information leak in Active Storage proxy mode · 12 Nov 2026
- HighCVE-2026-126081Action Pack: Possible Strong Parameters Bypass in Parameters#each_key · 12 Nov 2026
- MediumCVE-2026-126073Action Pack: Possible cache poisoning in Action Pack content negotiation · 10 Nov 2026
- LowCVE-2026-126067Action Pack: Missing SameSite attribute on session cookies from Action Pack session stores · 10 Nov 2026
- HighCVE-2026-126083Action Pack: Possible IP spoofing in Action Dispatch RemoteIp · 10 Nov 2026
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2023-28362
- Linkgithub.com/rails/rails/commit/1c3f93d1e90a3475f9ae2377ead25ccf11f71441
- Linkgithub.com/rails/rails/commit/69e37c84e3f77d75566424c7d0015172d6a6fac5
- Linkgithub.com/rails/rails/commit/c9ab9b32bcdcfd8bcd55907f6c7b20b4e004cc23
- Linkdiscuss.rubyonrails.org/t/cve-2023-28362-possible-xss-via-user-supplied-values-to-redirect-to/83132
- Packagegithub.com/rails/rails
- Linkgithub.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2023-28362.yml
- Linksecurity.netapp.com/advisory/ntap-20250502-0009
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.