CVE-2020-8164: High severity ruby on rails vulnerability
A deserialization of untrusted data vulnerability exists in rails < 5.2.4.3, rails < 6.0.3.1 which can allow an attacker to supply information can be inadvertently leaked fromStrong Parameters.
Other sources
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 eachvalue, or eachpair 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: { isadmin: true } User.update(cleanupparams) end
def cleanupparams params.each { |k, v| SomeModel.check(v) if k == :name } end
Note the mistaken use of each in the cleanupparams method in the above example.
Workarounds ----------- Do not use the return values of each, eachvalue, or eachpair in your application.
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is CVE-2020-8164?
CVE-2020-8164 is a deserialization of untrusted data vulnerability in Rails versions below 5.2.4.3 and below 6.0.3.1.
How does CVE-2020-8164 impact systems?
CVE-2020-8164 can lead to the inadvertent leakage of user-supplied information from Strong Parameters in Rails.
Which versions of Rails are affected by CVE-2020-8164?
Rails versions below 5.2.4.3 and below 6.0.3.1 are affected by CVE-2020-8164.
How can I fix CVE-2020-8164?
To fix CVE-2020-8164, upgrade to Rails version 5.2.4.3 or higher for Rails 5.x and version 6.0.3.1 or higher for Rails 6.x.
Where can I find more information about CVE-2020-8164?
More information about CVE-2020-8164 can be found at the following sources: [NVD](https://nvd.nist.gov/vuln/detail/CVE-2020-8164), [Ruby Advisory Database](https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2020-8164.yml), [Google Groups](https://groups.google.com/forum/#!topic/rubyonrails-security/f6ioe4sdpbY).