CVE-2026-33173
JSON

5.3medium

Rails Active Storage has possible content type bypass via metadata in direct uploads

Severity
5.3medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.43% (higher than 39% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-qcfx-2mfw-w4cg

Description

Active Storage allows users to attach cloud and local files in Rails applications. Prior to versions 8.1.2.1, 8.0.4.1, and 7.2.3.1, `DirectUploadsController` accepts arbitrary metadata from the client and persists it on the blob. Because internal flags like `identified` and `analyzed` are stored in the same metadata hash, a direct-upload client can set these flags to skip MIME detection and analysis. This allows an attacker to upload arbitrary content while claiming a safe `content_type`, bypassing any validations that rely on Active Storage's automatic content type identification. Versions 8.1.2.1, 8.0.4.1, and 7.2.3.1 contain a patch.

Affected

Product or packageVersionsReported by
rails activestorage>= 8.1.0.beta1, < 8.1.2.1, >= 8.0.0.beta1, < 8.0.4.1, < 7.2.3.1CVE List
activestorage (RubyGems)from 8.1.0.beta1 before 8.1.2.1, from 8.0.0.beta1 before 8.0.4.1, before 7.2.3.1GitHub Advisory Database
rubyonrails railsbefore 7.2.3.1, from 8.0.0 before 8.0.4.1, from 8.1.0 before 8.1.2.1NVD

All scores

GitHub_M5.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Classification

CWE-925

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Active Storage allows users to attach cloud and local files in Rails applications. Prior to versions 8.1.2.1, 8.0.4.1, and 7.2.3.1, `DirectUploadsController` accepts arbitrary metadata from the client and persists it on the blob. Because internal flags like `identified` and `analyzed` are stored in the same metadata hash, a direct-upload client can set these flags to skip MIME detection and analysis. This allows an attacker to upload arbitrary content while claiming a safe `content_type`, bypassing any validations that rely on Active Storage's automatic content type identification. Versions 8.1.2.1, 8.0.4.1, and 7.2.3.1 contain a patch.

GitHub Advisory Database
Impact

Active Storage's DirectUploadsController accepts arbitrary metadata from the client and persists it on the blob. Because internal flags like identified and analyzed are stored in the same metadata hash, a malicious direct-upload client could set these flags.

Releases

The fixed releases are available at the normal locations.

Credit

This was responsible reported by Hackerone researcher pwnie

NVD (es)

Active Storage permite a los usuarios adjuntar archivos locales y en la nube en aplicaciones Rails. Antes de las versiones 8.1.2.1, 8.0.4.1 y 7.2.3.1, 'DirectUploadsController' acepta metadatos arbitrarios del cliente y los persiste en el blob. Debido a que indicadores internos como 'identified' y 'analyzed' se almacenan en el mismo hash de metadatos, un cliente de carga directa puede establecer estos indicadores para omitir la detección y el análisis MIME. Esto permite a un atacante cargar contenido arbitrario mientras declara un 'content_type' seguro, eludiendo cualquier validación que dependa de la identificación automática del tipo de contenido de Active Storage. Las versiones 8.1.2.1, 8.0.4.1 y 7.2.3.1 contienen un parche.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-33173 changed 2026-03-24CVE Terms of Use
GitHub Advisory DatabaseGHSA-qcfx-2mfw-w4cg changed 2026-09-10CC-BY-4.0
NVDCVE-2026-33173 changed 2026-06-17Public domain