Plattform
ruby
Komponente
actionpack-page_caching
Behoben in
1.2.2
1.2.1
CVE-2020-8159 is a critical vulnerability affecting the actionpack-page_caching Ruby gem. This flaw allows attackers to write arbitrary files to a web server, potentially enabling remote code execution. The vulnerability impacts versions of the gem equal to or less than 1.2.0. A fix is available in version 1.2.1.
The core issue lies in the gem's handling of page caching mechanisms. An attacker can exploit this vulnerability to write files to the web server's file system. If the attacker can successfully write unescaped ERB (Embedded Ruby) code into a view template, they can then execute arbitrary code on the server. This represents a significant risk, potentially allowing attackers to gain full control of the web server and access sensitive data. The potential for remote code execution makes this a high-severity vulnerability, similar to other file upload vulnerabilities where malicious code can be injected.
CVE-2020-8159 was publicly disclosed on May 13, 2020. While no active exploitation campaigns have been definitively linked to this CVE, the ease of exploitation and the potential for remote code execution make it a high-priority target. Public proof-of-concept code is likely to exist or could be developed relatively easily. It is not listed on CISA KEV as of this writing.
Applications using the actionpack-page_caching gem in versions 1.2.0 or earlier are at risk. This includes Ruby on Rails applications that rely on page caching for performance optimization. Shared hosting environments where users have limited control over installed gems are particularly vulnerable.
• ruby / server:
find /path/to/your/ruby/gems -name 'actionpack-page_caching' -print0 | xargs -0 -n 1 du -s | grep '1.2.0' • generic web:
curl -I https://your-website.com/some/page | grep -i 'cache-control'• ruby / server:
gem list actionpack-page_cachingdisclosure
Exploit-Status
EPSS
5.42% (90% Perzentil)
CVSS-Vektor
The primary mitigation is to upgrade the actionpack-page_caching gem to version 1.2.1 or later. If upgrading is not immediately feasible due to compatibility issues or breaking changes, consider temporarily disabling page caching functionality. Review your application's code for any instances where user-supplied data is directly incorporated into file paths or view templates. Implement strict input validation and sanitization to prevent attackers from manipulating file paths. After upgrading, confirm the fix by attempting to trigger the vulnerability with a crafted request and verifying that the file write is prevented.
Actualice la gema actionpack_page-caching a la versión 1.2.1 o superior. Esto puede hacerse modificando el Gemfile de su aplicación Rails y ejecutando `bundle update actionpack_page-caching`.
Schwachstellenanalysen und kritische Warnungen direkt in deinen Posteingang.
CVE-2020-8159 is a critical vulnerability in the actionpack-page_caching gem allowing attackers to write arbitrary files, potentially leading to remote code execution. It affects versions <=1.2.0 and has a CVSS score of 9.8.
You are affected if your Ruby application uses the actionpack-page_caching gem in version 1.2.0 or earlier. Check your gem dependencies to determine if you are vulnerable.
Upgrade the actionpack-page_caching gem to version 1.2.1 or later. If upgrading is not possible immediately, disable page caching and implement stricter file access controls.
While no confirmed active exploitation campaigns have been publicly reported, the vulnerability's severity and ease of exploitation make it a potential target.
Refer to the RubySec advisory for detailed information: https://www.rubysec.com/2020-05-13-actionpack-page-caching-gem-arbitrary-file-access
Lade deine Abhängigkeitsdatei hoch und erfahre sofort, ob dich diese und andere CVEs treffen.
Lade deine Gemfile.lock-Datei hoch und wir sagen dir sofort, ob du betroffen bist.