Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade activestorage to version 7.2.3.2, 8.0.5.1, 8.1.3.1 or higher.
Affected versions of this package are vulnerable to Files or Directories Accessible to External Parties through the Vips analyzer and Vips transformer in vips.rb. An attacker can read files from the server, including process environment variables, by uploading a crafted image and causing Active Storage to process a variant or analyze it with libvips. Because unfuzzed libvips loaders and savers remained enabled, untrusted attachments could be passed to third-party operations that handle formats outside normal web images, exposing arbitrary filesystem contents and potentially secrets such as secret_key_base and external service credentials. Those secrets can be used to hijack sessions, decrypt application data, or pivot to remote code execution and lateral movement in the affected deployment.
Notes
Workarounds
libvips < 8.13, remove the ruby-vips dependency from the app’s Gemfile to stop Active Storage from using libvips at all; this avoids the vulnerable Vips analyzer/transformer path.libvips >= 8.13 is installed, set VIPS_BLOCK_UNTRUSTED=true in the environment before boot to disable libvips’ unfuzzed loaders and savers and block untrusted image processing.ruby-vips >= 2.2.1, call Vips.block_untrusted(true) from an initializer to disable unfuzzed loaders and savers during boot.image/bmp, image/vnd.microsoft.icon, and image/vnd.adobe.photoshop from config.active_storage.variable_content_types so Active Storage will not generate variants for those attachments and will fail closed on those formats.ruby-vips only for image analysis and not for Active Storage, remove ruby-vips from the Gemfile to avoid loading libvips in the application process.