UBUNTU-CVE-2026-126085: Medium severity ubuntu/rails vulnerability
Active Storage makes it simple to upload and reference files in cloud services and attach those files to Active Record objects. Prior to 8.1.4.1 and 8.0.5.2, ActiveStorage::Service::GCSService#urlfordirectupload does not bind the declared content length into the signed direct-upload URL, and #headersfordirectupload returns no length constraint, so the URL authorizes an upload body of any size. A direct-upload client could store a file larger than the bytesize it declared, and the resulting blob keeps the declared size, possibly bypassing application file size validations and quotas. This is the weakness that CVE-2020-8162 fixed in the S3 service. Applications that store files in Google Cloud Storage and accept direct uploads are affected. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ActiveStorage::Service::GCSServiceto a version that resolves this vulnerability.Fixed in 8.1.4.1 - Upgrade
Upgrade
ActiveStorage::Service::GCSServiceto a version that resolves this vulnerability.Fixed in 8.0.5.2
Event History
Frequently Asked Questions
Which deployments are exposed?
Applications using Active Storage with Google Cloud Storage that accept direct uploads are affected. The issue concerns GCSService direct-upload URL generation, not the S3 service.
What does an attacker need to exploit this?
The attacker needs to act as a direct-upload client able to obtain a signed direct-upload URL. They can upload a body larger than the declared byte_size because the signed URL and returned headers do not enforce the declared content length.
What is the practical impact of a successful exploit?
A blob can contain a larger file while retaining the smaller declared size. This can bypass application file-size validations or storage quotas that rely on the declared byte_size.
Which versions contain the fix?
The issue is fixed in Rails versions 8.1.4.1 and 8.0.5.2.