CVE-2023-28362: XSS

Published Jun 27, 2023
·
Updated

The redirectto 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 redirectto method.

Other sources

The redirectto 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.

— MITRE

Affected Software

5 affected componentsFixes available
rubygems/actionpack>=7.0.0<7.0.5.1
7.0.5.1
rubygems/actionpack<6.1.7.4
6.1.7.4
redhat/rubygem-actionpack<6.1.7.4
6.1.7.4
redhat/rubygem-actionpack<7.0.5.1
7.0.5.1
debian/rails
2:6.1.7.10+dfsg-1~deb12u22:6.1.7.10+dfsg-1~deb12u32:7.2.2.2+dfsg-2~deb13u12:7.2.2.2+dfsg-2~deb13u22:7.2.4+dfsg-2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rubygems/actionpack to a version that resolves this vulnerability.

    Fixed in 7.0.5.1
  2. Upgrade

    Upgrade rubygems/actionpack to a version that resolves this vulnerability.

    Fixed in 6.1.7.4
  3. Upgrade

    Upgrade redhat/rubygem-actionpack to a version that resolves this vulnerability.

    Fixed in 6.1.7.4
  4. Upgrade

    Upgrade redhat/rubygem-actionpack to a version that resolves this vulnerability.

    Fixed in 7.0.5.1
  5. Upgrade

    Upgrade debian/rails to a version that resolves this vulnerability.

    Fixed in 2:6.1.7.10+dfsg-1~deb12u2Fixed in 2:6.1.7.10+dfsg-1~deb12u3Fixed in 2:7.2.2.2+dfsg-2~deb13u1Fixed in 2:7.2.2.2+dfsg-2~deb13u2Fixed in 2:7.2.4+dfsg-2
  6. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 7.0.5.1
  7. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 6.1.7.4
  8. Configuration

    Avoid providing user-supplied URLs with arbitrary schemes to the redirect_to method; ensure the Rails app is configured to allow redirects to external hosts is false (defaults to false in Rails >= 7.0.x).

    Rails redirect_to allow_redirects_to_external_hosts = false
  9. Compensating control

    If downstream services enforce RFC compliance on HTTP response headers, be aware the Location header may be removed; validate redirect behavior after upgrading and test downstream interactions.

Event History

Jun 27, 2023
Data Sourced
via Red Hat·05:37 AM
DescriptionSeverityAffected Software
Jun 29, 2023
Advisory Published
via GitHub·03:03 PM
Jan 9, 2025
CVE Published
via MITRE·12:33 AM
Data Sourced
via MITRE·12:33 AM
Description
Data Sourced
via NVD·01:15 AM
DescriptionSeverityWeakness

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2023-28362?

CVE-2023-28362 is a medium severity vulnerability due to improper handling of characters in HTTP headers.

2

How do I fix CVE-2023-28362?

To mitigate CVE-2023-28362, upgrade the `rubygem-actionpack` package to version 6.1.7.4 or 7.0.5.1.

3

What type of vulnerability is CVE-2023-28362?

CVE-2023-28362 is an HTTP header injection vulnerability affecting the `redirect_to` method in Rails.

4

Which versions of actionpack are affected by CVE-2023-28362?

CVE-2023-28362 affects actionpack versions below 6.1.7.4 and 7.0.5.1.

5

What impact does CVE-2023-28362 have on my application?

CVE-2023-28362 may cause downstream services to remove the assigned Location header, potentially leading to redirect issues.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203