Possible Strong Parameters Bypass in ActionPack
High severity
GitHub Reviewed
Published
May 26, 2020
to the GitHub Advisory Database
•
Updated Sep 25, 2023
Package
Affected versions
>= 5.0.0, <= 5.2.4.2
>= 6.0.0, <= 6.0.3
Patched versions
5.2.4.3
6.0.3.1
Description
Reviewed
May 26, 2020
Published to the GitHub Advisory Database
May 26, 2020
Published by the National Vulnerability Database
Jun 19, 2020
Last updated
Sep 25, 2023
There is a strong parameters bypass vector in ActionPack.
Versions Affected: rails <= 6.0.3
Not affected: rails < 5.0.0
Fixed Versions: rails >= 5.2.4.3, rails >= 6.0.3.1
Impact
In some cases user supplied information can be inadvertently leaked from
Strong Parameters. Specifically the return value of
each
, oreach_value
,or
each_pair
will return the underlying "untrusted" hash of data that wasread from the parameters. Applications that use this return value may be
inadvertently use untrusted user input.
Impacted code will look something like this:
Note the mistaken use of
each
in theclean_up_params
method in the aboveexample.
Workarounds
Do not use the return values of
each
,each_value
, oreach_pair
in yourapplication.
References