CVE-2020-8185: Actionpack Untrusted Users Can Run Pending Vulnerability
MODERATECVE-2020-8185 is a MODERATE (CVSS 6.5) untrusted users can run pending vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Actionpack libraries in the RubyGems ecosystem. The issue involves untrusted users can run pending migrations in production in rails. Remediation is available by upgrading affected packages to version 6.0.3.2.
CVE-2020-8185 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2020-8185
To remediate this vulnerability, upgrade all affected Actionpack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade actionpack to 6.0.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for actionpack
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-8185, inspect your project dependencies for Actionpack:
inspect dependencies for actionpack
Analyze the terminal output to locate any version of Actionpack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.0.3.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Actionpack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-8185 Affected Actionpack Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
actionpack
|
RubyGems |
≥ 6.0.0
< 6.0.3.2
|
6.0.3.2
|
References
Frequently Asked Questions
What is CVE-2020-8185?
Which Actionpack versions are affected?
What version fixes CVE-2020-8185?
Is actionpack affected?
What is the CVSS score of CVE-2020-8185?
What CWE is associated with CVE-2020-8185?
How can I check RubyGems dependencies for CVE-2020-8185?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c6qr-h5vq-59jc",
"modified" : "2023-07-05T20:24:19Z",
"published" : "2020-06-24T17:40:33Z",
"aliases" : [ "CVE-2020-8185" ],
"summary" : "Untrusted users can run pending migrations in production in Rails",
"details" : "There is a vulnerability in versions of Rails prior to 6.0.3.2 that allowed an untrusted user to run any pending migrations on a Rails app running in production.\n\nThis vulnerability has been assigned the CVE identifier CVE-2020-8185.\n\nVersions Affected: 6.0.0 < rails < 6.0.3.2\nNot affected: Applications with `config.action_dispatch.show_exceptions = false` (this is not a default setting in production)\nFixed Versions: rails >= 6.0.3.2\n\nImpact\n------\n\nUsing this issue, an attacker would be able to execute any migrations that are pending for a Rails app running in production mode. It is important to note that an attacker is limited to running migrations the application developer has already defined in their application and ones that have not already run.\n\nWorkarounds\n-----------\n\nUntil such time as the patch can be applied, application developers should disable the ActionDispatch middleware in their production environment via a line such as this one in their config/environment/production.rb:\n\n`config.middleware.delete ActionDispatch::ActionableExceptions`",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "actionpack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.0.3.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.0.3.1"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-8185"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/commit/2121b9d20b60ed503aa041ef7b926d331ed79fc2"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/899069"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2020-8185.yml"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/g/rubyonrails-security/c/pAe9EV8gbM0"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XJ7NUWXAEVRQCROIIBV4C6WXO6IR3KSB"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-24T17:33:58Z",
"nvd_published_at" : "2020-07-02T19:15:00Z"
}
}