{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","feed_url":"https://feed.craftedsignal.io/tags/active_storage/feed.json","home_page_url":"https://feed.craftedsignal.io/","items":[{"_cs_actors":[],"_cs_cpes":[],"_cs_cves":[],"_cs_exploited":false,"_cs_has_poc":false,"_cs_poc_references":[],"_cs_products":["Active Storage"],"_cs_severities":["high"],"_cs_tags":["rails","active_storage","file_deletion","vulnerability"],"_cs_type":"advisory","_cs_vendors":["Rails"],"content_html":"\u003cp\u003eA critical vulnerability exists in Active Storage, a component of the Rails web application framework, affecting versions prior to 8.1.2.1, 8.0.4.1, and 7.2.3.1. The vulnerability, identified as CVE-2026-33202, stems from the \u003ccode\u003eDiskService#delete_prefixed\u003c/code\u003e method's improper handling of glob metacharacters within blob keys. Specifically, the method passes blob keys directly to \u003ccode\u003eDir.glob\u003c/code\u003e without proper escaping. An attacker who can control the input of blob keys, either through direct manipulation or custom generation, can inject glob metacharacters (e.g., *, ?, []) into the key. This allows the attacker to delete unintended files residing within the storage directory, potentially leading to data loss or service disruption. Successful exploitation requires the application to be configured to use the DiskService and the attacker to have a mechanism to influence the blob key.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eThe attacker identifies a Rails application utilizing Active Storage and the DiskService.\u003c/li\u003e\n\u003cli\u003eThe attacker discovers or engineers a method to influence the generation or modification of blob keys. This might involve exploiting an existing application vulnerability (e.g., SQL injection) or manipulating application logic.\u003c/li\u003e\n\u003cli\u003eThe attacker crafts a malicious blob key containing glob metacharacters (e.g., \u003ccode\u003eevil*key\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003eThe application attempts to delete a file using the crafted blob key via \u003ccode\u003eDiskService#delete_prefixed\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eDiskService#delete_prefixed\u003c/code\u003e passes the malicious blob key to \u003ccode\u003eDir.glob\u003c/code\u003e without proper escaping.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eDir.glob\u003c/code\u003e interprets the glob metacharacters, causing it to match multiple files in the storage directory based on the attacker's crafted pattern. For example, \u003ccode\u003eevil*key\u003c/code\u003e could match \u003ccode\u003eevilfilekey\u003c/code\u003e, \u003ccode\u003eevilotherkey\u003c/code\u003e, etc.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eDir.glob\u003c/code\u003e deletes all matching files from the storage directory.\u003c/li\u003e\n\u003cli\u003eThe attacker achieves arbitrary file deletion, potentially leading to data loss or service disruption.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eSuccessful exploitation of this vulnerability allows an attacker to delete arbitrary files within the Active Storage's configured storage directory. This could lead to significant data loss, potentially disrupting application functionality and impacting users. The severity is heightened when sensitive information is stored within the affected directories. Given the wide adoption of Rails, a successful widespread attack could impact a large number of applications across various sectors. The CVSS v3.1 base score for this vulnerability is 9.1 (Critical).\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eUpgrade to Active Storage versions 8.1.2.1, 8.0.4.1, or 7.2.3.1 or later to incorporate the patch for CVE-2026-33202.\u003c/li\u003e\n\u003cli\u003eImplement input validation and sanitization on blob keys to prevent the injection of glob metacharacters.\u003c/li\u003e\n\u003cli\u003eMonitor application logs for suspicious file deletion activity, particularly within the Active Storage storage directory, using the provided Sigma rule.\u003c/li\u003e\n\u003cli\u003eImplement principle of least privilege on the storage directory to limit the impact of file deletion.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2024-01-10T12:00:00Z","date_published":"2024-01-10T12:00:00Z","id":"https://feed.craftedsignal.io/briefs/2024-01-rails-active-storage-delete/","summary":"A vulnerability in Rails Active Storage allows attackers to delete arbitrary files in the storage directory by exploiting glob metacharacters in blob keys passed to `Dir.glob`.","title":"Rails Active Storage Vulnerability Allows Arbitrary File Deletion","url":"https://feed.craftedsignal.io/briefs/2024-01-rails-active-storage-delete/"}],"language":"en","title":"CraftedSignal Threat Feed - Active_storage","version":"https://jsonfeed.org/version/1.1"}