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
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).
The FIXED releases are available at the normal locations.
Avoid providing user supplied URLs with arbitrary schemes to the redirect_to
method.
Vendor | Product | Version | CPE |
---|---|---|---|
actionpack_project | actionpack | * | cpe:2.3:a:actionpack_project:actionpack:*:*:*:*:*:ruby:*:* |
discuss.rubyonrails.org/t/cve-2023-28362-possible-xss-via-user-supplied-values-to-redirect-to/83132
github.com/advisories/GHSA-4g8v-vg43-wpgf
github.com/rails/rails/commit/1c3f93d1e90a3475f9ae2377ead25ccf11f71441
github.com/rails/rails/commit/c9ab9b32bcdcfd8bcd55907f6c7b20b4e004cc23
github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2023-28362.yml