🚀 Active Storage Dashboard
A beautiful Rails engine that provides a sleek, modern dashboard for monitoring and inspecting Active Storage data in your Rails application.
🚨 Security advisory: CVE-2026-66066 (Active Storage / libvips)
CVE-2026-66066 allows an unauthenticated attacker who can upload a crafted file to read arbitrary
files from your server, including the process environment — which usually holds secret_key_base,
your master key, and credentials for your database and storage provider. That can escalate to remote
code execution.
This gem does not contain the vulnerability and cannot fix it. The flaw is in Active Storage's
use of libvips, and the fix is to upgrade activestorage (to 7.2.3.2, 8.0.5.1, 8.1.3.1 or
later) with libvips >= 8.13.
What matters here is that this dashboard triggers the vulnerable code paths in bulk, so it can fire an exploit that would otherwise sit dormant:
| Feature | Call | Why it matters |
|---|---|---|
rails active_storage:dashboard:reanalyze |
blob.analyze |
Hands the raw uploaded bytes straight to Vips::Image.new_from_file. The only gate is the attacker-supplied content type. |
rails active_storage:dashboard:regenerate_variants |
representation(...).processed |
Reprocesses every stored variant through libvips. |
| Blob/attachment previews in the UI | blob.preview(...).processed |
Runs the previewer chain over untrusted files while you browse. |
Two things make this worse than an ordinary application code path. These operations run over every blob, so an attacker does not need to lure anyone into viewing their file — they just wait for maintenance. And the rake tasks typically run on a production host with the full deployment environment loaded, which is exactly the environment the advisory says gets exfiltrated.
Note that an application can be affected even if it never displays image variants; image analysis alone is enough.
What to do
-
Do not run
active_storage:dashboard:reanalyze,:regenerate_variants, or:alluntil you have upgraded. These are the highest-risk paths in this gem. - Upgrade
activestorageand ensure libvips>= 8.13. -
Rotate every secret readable by the application process —
secret_key_base, your master key and everything incredentials.yml.enc, storage service keys, database credentials, and any third-party tokens. Upgrading closes the hole but does not un-leak anything already taken. - If you cannot upgrade yet but have libvips
>= 8.13, setVIPS_BLOCK_UNTRUSTED=1in the application's environment as an interim mitigation.
The dashboard shows a Processing Safety panel reporting the state of your own environment, and warns on every page while it detects an unsafe configuration.
✨ Features
- 📊 Overview of Active Storage usage statistics
- 🔍 Browse and inspect blobs, attachments and variant records
- 📝 View metadata, file details, and relationships
- 🎨 Modern, responsive UI with animations
- 🚫 No external dependencies (vanilla JavaScript and CSS)
📥 Installation
Add this line to your application's Gemfile:
gem 'active_storage_dashboard'And then execute:
$ bundle🔧 Usage
Mount the engine in your config/routes.rb file:
Rails.application.routes.draw do
# IMPORTANT: Make sure the mount path does not contain any special characters
# Use a simple path like '/active-storage-dashboard' or '/storage-dashboard'
# This is crucial for proper URL generation
mount ActiveStorageDashboard::Engine, at: "/active-storage-dashboard"
endThen visit /active-storage-dashboard in your browser to see the beautiful dashboard.
📁 File Downloads
The dashboard provides direct file download capabilities from both the list and detail views. Simply click on the download button to get your files.
Tasks
The dashboard includes a task to remove unused blobs and attachments.
You can run this task from the command line:
$ rails active_storage:dashboard:purge_orphansRe-analyze blobs that are not yet analyzed
$ rails active_storage:dashboard:reanalyzeRegenerate missing or outdated variants
$ rails active_storage:dashboard:regenerate_variants📸 Screenshots
Dashboard Overview
Blob Details
Files Gallery
🔒 Security Considerations
This dashboard provides access to all Active Storage data. Consider adding authentication before using in production:
# config/routes.rb
authenticate :user, -> (user) { user.admin? } do
mount ActiveStorageDashboard::Engine, at: "/active-storage-dashboard"
endor with devise:
constraints lambda { |req| req.session[:user_id].present? || (req.env['warden'] && req.env['warden'].user(:user)) } do
mount ActiveStorageDashboard::Engine, at: "/active-storage-dashboard"
endOr, in your environment config or application.rb:
config.active_storage_dashboard.base_controller_class = "AdminController"🤝 Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/giovapanasiti/active_storage_dashboard.
📝 License
The gem is available as open source under the terms of the MIT License.


