Skip to content
PatchBriefing

Search PatchBriefing

Type at least two characters. Results update as you type.

Search CVEs, products, packages and article titles.

Nothing found. Identifiers such as CVE and GHSA can be searched in both languages.

Subscribe

This advisory has been withdrawn by its source. The report below is preserved for the record.

Critical · 9.8 Critical vulnerabilities CVE-2026-126082

Critical Active Storage Vulnerability Allows Arbitrary File Write and Read via ImageMagick (CVE-2026-126082)

A critical vulnerability in Active Storage lets an unauthenticated attacker write arbitrary files and, in some configurations, read sensitive files by uploading a crafted file processed by ImageMagick. The issue is fixed in versions 8.1.4.1 and 8.0.5.2.

By PatchBriefing ·

Produced automatically from official sources with the help of AI. How we work →

Synthesized by AI from 2 sources · updated 1 week ago

AI summary

A critical vulnerability has been disclosed in Active Storage, the component that handles file uploads and attachments for Active Record objects. The issue, tracked as CVE-2026-126082, allows an unauthenticated attacker to write arbitrary files on a server and, under certain storage configurations, read arbitrary files accessible to the application process. This can expose sensitive data such as secret keys and credentials for connected systems, potentially enabling further compromise. The vulnerability is fixed in versions 8.1.4.1 and 8.0.5.2.

What happened

A vulnerability has been identified in Active Storage affecting how it handles file attachments processed with ImageMagick. When ImageMagick is used for image processing, it selects a coder based on the content of the uploaded file. Some coders act on files referenced inside the image data rather than the image itself. Active Storage did not restrict which coders ImageMagick could use, and since the ImageMagick analyzer runs automatically when a file is attached, an attacker could craft a malicious upload to trigger an unintended coder. No variant, preview, or explicit analyze call is required; simply attaching the upload is sufficient to trigger the issue.

Technical cause

The root cause is that Active Storage did not constrain which ImageMagick coders could be invoked during file processing. ImageMagick selects a coder automatically based on file content, and certain coders are designed to read or write files named within the uploaded content itself, rather than only operating on the image data. Because this coder selection was unconstrained, an attacker could abuse it to write arbitrary files to the server. When attachments are stored using the Disk service, the same underlying weakness can also be exploited to read arbitrary files accessible to the application process, including files that typically contain secret_key_base values and credentials for external systems. One specific attack chain exploiting this behavior has been reported, though other chains using different coders may exist.

Why it matters

Exposure of files such as secret_key_base or credentials for external systems can allow an attacker to escalate from this vulnerability to remote code execution or move laterally into other connected systems. Because the vulnerability requires no authentication and no user interaction beyond an attacker uploading a file, it presents a significant risk to any application that accepts uploads from untrusted users under the affected configuration.

Who is affected

Applications are affected when they use ImageMagick for Active Storage image processing via the config.active_storage.variant_processor = :mini_magick setting, run ImageMagick under a security policy that does not already deny the coders involved, and allow file uploads from untrusted users. The arbitrary file read impact specifically applies to applications using the Disk storage service for attachments.

Affected versions

The vulnerability affects Active Storage prior to versions 8.1.4.1 and 8.0.5.2.

Fixes and mitigation

This issue is fixed in versions 8.1.4.1 and 8.0.5.2. Applications should update to one of these fixed versions. For environments that cannot update immediately, reviewing the ImageMagick security policy to ensure it denies the coders involved in this attack chain, and restricting or carefully validating file uploads from untrusted users, may reduce exposure, though the fact package does not specify a complete workaround beyond upgrading.

Recommended action

Site owners and developers running Active Storage with ImageMagick-based image processing should update to version 8.1.4.1 or 8.0.5.2 as soon as possible. Applications should also review whether untrusted users can upload files and whether attachments are stored using the Disk service, as this combination increases the severity of potential impact. Rotating secret_key_base and any credentials that may have been exposed is advisable if there is reason to believe the application was vulnerable and exposed to untrusted uploads before patching.

PatchBriefing score

9.8 / 10 · Critical

Official CVSS: 9.8

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS 0.0087 (59 percentile)

Why this score

The PatchBriefing score equals the official CVSS score; when this article covers several vulnerabilities, the highest one. Signals such as known exploitation and EPSS are listed separately and do not change the score.

Affected versions

Reported fixes

This issue is fixed in versions 8.1.4.1 and 8.0.5.2. Applications should update to one of these fixed versions. For environments that cannot update immediately, reviewing the ImageMagick security policy to ensure it denies the coders involved in this attack chain, and restricting or carefully validating file uploads from untrusted users, may reduce exposure, though the fact package does not specify a complete workaround beyond upgrading.

How this was built

2 source records were collected, matched and used to prepare the report above.

  • NVD (NIST) database
  • CVE.org database
Unified report
Critical Active Storage Vulnerability Allows Arbitrary File Write and Read via ImageMagick (CVE-2026-126082)
1 article · 2 sources cited
Revision history
  1. Published
  2. Generated
The Morning Brief

Relevant changes for the stacks you follow.

Choose your stacks, topics and optional WordPress plugins. At 07:00 CET, matching advisories and releases from the reporting period are grouped into one email.

✓ Choose stacks and topics✓ Change preferences anytime✓ One grouped email