GitHub Advisoryadvisory · RubyGems
GHSA-4g8v-vg43-wpgf Actionpack has possible cross-site scripting vulnerability via User Supplied Values to redirect_to
MEDIUM
Official page ↗
- Aliases
- CVE-2023-28362
- Ecosystem
- RubyGems
- Packages
- actionpack
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- Weaknesses
- CWE-116
- Reviewed
- 2023-06-29
Affected packages
• RubyGems actionpack: < 6.1.7.4 → fixed in 6.1.7.4
• RubyGems actionpack: >= 7.0.0, < 7.0.5.1 → fixed in 7.0.5.1
Description
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.
Related
Alias · CVE (1)
- CVE-2023-28362 The redirect_to method in Rails allows provided values to contain characters which are not legal in an HTTP header value. vulnerability
Weakness · CWE (1)
- CWE-116 Improper Encoding or Escaping of Output weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2023-28362 advisory
- https://github.com/rails/rails/commit/1c3f93d1e90a3475f9ae2377ead25ccf11f71441 web
- https://github.com/rails/rails/commit/69e37c84e3f77d75566424c7d0015172d6a6fac5 web
- https://github.com/rails/rails/commit/c9ab9b32bcdcfd8bcd55907f6c7b20b4e004cc23 web
- https://discuss.rubyonrails.org/t/cve-2023-28362-possible-xss-via-user-supplied-values-to-redirect-to/83132 web
- https://github.com/rails/rails package
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2023-28362.yml web
- https://security.netapp.com/advisory/ntap-20250502-0009 web