CVE-2020-8159: Actionpack page caching Arbitrary File Write Vulnerability
CRITICALCVE-2020-8159 is a CRITICAL (CVSS 9.8) arbitrary file write vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Actionpack page caching libraries in the RubyGems ecosystem. The issue involves arbitrary file write in actionpack-page_caching gem. Remediation is available by upgrading affected packages to version 1.2.1.
CVE-2020-8159 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2020-8159
To remediate this vulnerability, upgrade all affected Actionpack page caching 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-page_caching to 1.2.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for actionpack-page_caching
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-8159, inspect your project dependencies for Actionpack page caching:
inspect dependencies for actionpack-page_caching
Analyze the terminal output to locate any version of Actionpack page caching in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.1), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Actionpack page caching, 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-8159 Affected Actionpack page caching Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
actionpack-page_caching
|
RubyGems |
< 1.2.1
|
1.2.1
|
References
Frequently Asked Questions
What is CVE-2020-8159?
Which Actionpack page caching versions are affected?
What version fixes CVE-2020-8159?
Is actionpack-page_caching affected?
What is the CVSS score of CVE-2020-8159?
What CWE is associated with CVE-2020-8159?
How can I check RubyGems dependencies for CVE-2020-8159?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mg5p-95m9-rmfp",
"modified" : "2021-07-26T21:16:26Z",
"published" : "2020-05-13T16:28:46Z",
"aliases" : [ "CVE-2020-8159" ],
"summary" : "Arbitrary file write in actionpack-page_caching gem",
"details" : "There is a vulnerability in actionpack_page-caching gem < v1.2.1 that allows an attacker to write arbitrary files to a web server, potentially resulting in remote code execution if the attacker can write unescaped ERB to a view.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "actionpack-page_caching"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-8159"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/actionpack-page_caching/commit/127da70a559bed4fc573fdb4a6d498a7d5815ce2"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/#!topic/rubyonrails-security/CFRVkEytdP8"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2021/07/msg00019.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-05-13T16:28:30Z",
"nvd_published_at" : "2020-05-12T13:15:00Z"
}
}