MEDIUM · CVSS 3.0 4.3 EPSS 0.5% · 44th percentile CWE-248

CVE-2026-126074: Active Storage: Possible DoS vulnerability in Active Storage filename handling

Published 2026-11-10 · Updated 2026-11-10 · Also known as GHSA-p2pm-g2h6-7j5j

Summary

Active Storage passes stored filenames unmodified to Ruby file methods, causing an ArgumentError and persistent denial of service when filenames contain NUL bytes. Ruby on Rails developers using SQLite or MySQL/MariaDB with affected Active Storage versions must upgrade immediately.

Who is affected

Applications using RubyGems activestorage that rely on databases accepting NUL bytes in string columns, such as SQLite and MySQL/MariaDB, are affected if a permitted user uploads an attachment with a NUL byte in the filename. Subsequent requests attempting to build variants, previews, open the blob, or render it as an Action Text attachment will raise an ArgumentError, causing persistent denial of service for pages displaying the blob. PostgreSQL applications are unaffected because PostgreSQL rejects the database row.

Exploitability

The vulnerability has a CVSS base score of 4.3 with a vector of CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L, indicating network accessibility, low attack complexity, and low privileges required without user interaction, resulting in availability impact only. The EPSS score is 0.005 and CISA KEV active exploitation status is false.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
RubyGems activestorage >= 8.1.0.beta1, < 8.1.4.1 8.1.4.1 bundle update activestorage
RubyGems activestorage >= 0, < 8.0.5.2 8.0.5.2 bundle update activestorage

CVSS 3.0 vector

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

Attack vectorNetwork
Attack complexityLow
Privileges requiredLow
User interactionNone
ScopeUnchanged
ConfidentialityNone
IntegrityNone
AvailabilityLow

FAQ

Are PostgreSQL applications affected?

No, applications that use PostgreSQL are not affected because PostgreSQL rejects rows containing NUL bytes.

Does this vulnerability leak data or allow code execution?

No, the impact is strictly limited to availability (Denial of Service) with no confidentiality or integrity impact.

Is any data migration required after upgrading?

No, stored filenames are not modified, and no data migration is required.

Original advisory description
### Impact `ActiveStorage::Filename#base` and `#extension_with_delimiter`, and therefore `#extension`, pass the stored filename unmodified to `File.basename` and `File.extname`, which raise `ArgumentError` when the name contains a NUL byte. Active Storage stores the client-supplied filename verbatim, so a user who is permitted to upload an attachment could persist such a filename on databases that accept NUL bytes in string columns, such as SQLite and MySQL/MariaDB. Each subsequent request that builds a variant or preview of the blob, opens it, or renders it as an Action Text attachment then raises, possibly resulting in a persistent DoS vulnerability for the pages that display the blob until it is purged or its filename is corrected. Applications that use PostgreSQL are not affected, because PostgreSQL rejects the row. ### Details `Filename#base` and `#extension_with_delimiter` now derive from `Filename#sanitized`, the form that `Filename#to_s` and the `Content-Disposition` header already use. For a filename that `#sanitized` changes, such as one containing a NUL byte, an invalid byte sequence, a path separator or another replaced character, the base and extension now agree with `#to_s`; the variant format inferred from such a name may change, and an existing variant may be regenerated once. Stored filenames are not modified, and no data migration is required. ### Releases The fixed releases are available at the normal locations. Patches for those who cannot upgrade at once: - 8.1: https://github.com/rails/rails/commit/60f22af88b71eae251f112d8c0237a08a8832692.patch - 8.0: https://github.com/rails/rails/commit/9b0d4bef2211a2c08cab2e0ea17fa1d0efd5d47a.patch ### Credit This issue was found by the Anthropic OSS Scanner (ANT-2026-UQM5Z4YL).

References

Source records: GHSA-p2pm-g2h6-7j5j (OSV.dev) · EPSS by FIRST, 2026-11-21.