CVE-2021-22885: Infoleak

Published May 5, 2021
·
Updated

A flaw was found in rubygem-actionpack. Information disclosure or unintended method execution is possible when using the redirectto or polymorphicurl helper with untrusted user input. The highest threat from this vulnerability is to data confidentiality.

Other sources

A possible information disclosure / unintended method execution vulnerability in Action Pack >= 2.0.0 when using the redirectto or polymorphicurlhelper with untrusted user input.

There is a possible information disclosure / unintended method execution vulnerability in Action Pack which has been assigned the CVE identifier CVE-2021-22885.

Versions Affected: >= 2.0.0. Not affected: < 2.0.0. Fixed Versions: 6.1.3.2, 6.0.3.7, 5.2.4.6, 5.2.6

Impact ------ There is a possible information disclosure / unintended method execution vulnerability in Action Pack when using the redirectto or polymorphicurl helper with untrusted user input.

Vulnerable code will look like this:

redirectto(params[:someparam])

All users running an affected release should either upgrade or use one of the workarounds immediately.

Releases -------- The FIXED releases are available at the normal locations.

Workarounds ----------- To work around this problem, it is recommended to use an allow list for valid parameters passed from the user. For example:

private def check(param) case param when "valid" param else "/" end end

def index redirectto(check(params[:someparam])) end

Or force the user input to be cast to a string like this:

def index redirectto(params[:someparam].tos) end

Patches ------- To aid users who aren't able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset.

5-2-information-disclosure.patch - Patch for 5.2 series 6-0-information-disclosure.patch - Patch for 6.0 series 6-1-information-disclosure.patch - Patch for 6.1 series

Please note that only the 5.2, 6.0, and 6.1 series are supported at present. Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases.

References:

https://www.openwall.com/lists/oss-security/2021/05/05/3

Red Hat

Affected Software

11 affected componentsFixes available
redhat/tfm-rubygem-actionpack<0:6.0.3.7-1.el7
0:6.0.3.7-1.el7
debian/rails
2:5.2.2.1+dfsg-1+deb10u32:5.2.2.1+dfsg-1+deb10u52:6.0.3.7+dfsg-2+deb11u22:6.1.7.3+dfsg-12:6.1.7.3+dfsg-2
redhat/rubygem-actionpack<6.1.3.2
6.1.3.2
redhat/rubygem-actionpack<6.0.3.7
6.0.3.7
redhat/rubygem-actionpack<5.2.4.6
5.2.4.6
redhat/rubygem-actionpack<5.2.6
5.2.6
rubyonrails Rails>=5.2.0.0<5.2.4.6
rubyonrails Rails>=6.0.0.0<6.0.3.7
rubyonrails Rails>=6.1.0.0<6.1.3.1
rubyonrails Actionpack Page-caching
Debian Debian Linux=10.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 0:6.0.3.7-1.el7
  2. Upgrade

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

    Fixed in 2:5.2.2.1+dfsg-1+deb10u3Fixed in 2:5.2.2.1+dfsg-1+deb10u5Fixed in 2:6.0.3.7+dfsg-2+deb11u2Fixed in 2:6.1.7.3+dfsg-1Fixed in 2:6.1.7.3+dfsg-2
  3. Upgrade

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

    Fixed in 6.1.3.2
  4. Upgrade

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

    Fixed in 6.0.3.7
  5. Upgrade

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

    Fixed in 5.2.4.6
  6. Upgrade

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

    Fixed in 5.2.6
  7. Upgrade

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

    Fixed in 6.1.3.2
  8. Upgrade

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

    Fixed in 6.0.3.7
  9. Upgrade

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

    Fixed in 5.2.4.6
  10. Upgrade

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

    Fixed in 5.2.6
  11. Upgrade

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

    Patch 5-2-information-disclosure.patch
  12. Upgrade

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

    Patch 6-0-information-disclosure.patch
  13. Upgrade

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

    Patch 6-1-information-disclosure.patch
  14. Configuration

    To mitigate CVE-2021-22885 without upgrading immediately, ensure that parameters passed from untrusted user input to the `redirect_to` or `polymorphic_url` helpers are cast to a string before use (example: `redirect_to(params[:some_param].to_s)`).

    rubygem-actionpack (Action Pack) redirect_to / polymorphic_url helper user input handling = cast untrusted user input to a string before use (e.g., redirect_to(params[:some_param].to_s) )

Event History

May 5, 2021
CVE Published
12:00 AM
Data Sourced
via Red Hat·06:57 PM
DescriptionSeverityAffected Software
May 7, 2021
Data Sourced
07:39 PM
SeverityAffected Software
May 27, 2021
CVE Published
via MITRE·11:15 AM
Data Sourced
via MITRE·11:15 AM
DescriptionWeakness

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2021-22885?

CVE-2021-22885 is a possible information disclosure / unintended method execution vulnerability in Action Pack >= 2.0.

2

What is the severity of CVE-2021-22885?

CVE-2021-22885 has a severity value of 7.5, classifying it as high.

3

Which software is affected by CVE-2021-22885?

CVE-2021-22885 affects rubygem-actionpack versions 5.2.4.6, 6.0.3.7, and 6.1.3.2.

4

How can I fix CVE-2021-22885?

To fix CVE-2021-22885, upgrade to rubygem-actionpack version 6.1.3.2, 6.0.3.7, or 5.2.4.6 depending on the version you are using.

5

Where can I find more information about CVE-2021-22885?

You can find more information about CVE-2021-22885 on the Red Hat Security Advisory page and the Openwall mailing list.

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