Advisory

GHSA-8727-m6gj-mc37

Also known as: CVE-2020-8164

Summary

Possible Strong Parameters Bypass in ActionPack

Details

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, or each_value,
or each_pair will return the underlying "untrusted" hash of data that was
read from the parameters. Applications that use this return value may be
inadvertently use untrusted user input.

Impacted code will look something like this:

def update
  # Attacker has included the parameter: `{ is_admin: true }`
  User.update(clean_up_params)
end

def clean_up_params
   params.each { |k, v|  SomeModel.check(v) if k == :name }
end

Note the mistaken use of each in the clean_up_params method in the above
example.

Workarounds
-----------
Do not use the return values of each, each_value, or each_pair in your
application.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2020-05-26 15:09 UTC
Modified
2024-02-16 08:12 UTC

Affected packages and fixes

actionpack

RubyGems · All systems

Affected

  • introduced 5.0.0, fixed 5.2.4.3 (ecosystem)

Fixed versions

5.2.4.3

Fix

The export has no generic command for this ecosystem.

actionpack

RubyGems · All systems

Affected

  • introduced 6.0.0, fixed 6.0.3.1 (ecosystem)

Fixed versions

6.0.3.1

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences