/

CVE-2026-27607

Severity:

HIGH RISK

(8.1)

Improper Input Validation in RustFS Object Storage

CVE-2026-27607

Analyzed

Vulnerability type

Category:

Improper Input Validation

CWE:

CWE-20, CWE-863

Impact:

Security Policy Bypass and Unauthorized File Uploads

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

RustFS versions 1.0.0-alpha.56 through 1.0.0-alpha.82 fail to correctly validate policy conditions for presigned POST (PostObject) uploads, including content-length-range, starts-with, and Content-Type constraints.

Attackers who obtain or generate presigned POST forms can bypass these restrictions to upload oversized files, write to arbitrary object keys, or spoof content types, which may lead to storage exhaustion, unauthorized data access paths, and other security policy bypasses.

Affected context

This vulnerability occurs in RustFS deployments that expose presigned POST (PostObject) upload functionality to clients or downstream services.

The issue is present when:

  • Clients upload objects using HTML forms or API clients based on presigned POST policies.
  • The server-side RustFS instance does not re-validate policy conditions such as content-length-range, starts-with (e.g., key prefixes), and Content-Type.

It primarily affects multi-tenant or internet-facing storage deployments that rely on these policies to enforce upload constraints and tenant isolation.

Exploit preconditions

  • Attack surface: Presigned POST (PostObject) upload endpoint exposed by RustFS, reachable over the network by clients.
  • Required access: Ability to use or obtain a valid presigned POST policy (e.g., through a legitimate application workflow, leaked form data, or predictable issuance).
  • Trigger point: Submitting a POST upload that intentionally violates the original policy conditions (oversized payload, different key, or unexpected Content-Type) while still presenting valid presigned fields.
  • Why exploitation is possible: RustFS trusts the presence of presigned POST parameters but does not enforce all policy conditions server-side, allowing uploads that should be rejected according to the policy definition.

Why this happens

The root cause is inadequate server-side validation of presigned POST policy conditions, aligning with CWE-20: Improper Input Validation.

While presigned POST policies are intended to restrict aspects of an upload (object key patterns, Content-Type, and size range), RustFS fails to fully check these constraints when processing incoming requests.

The system implicitly assumes that the signed form fields, once verified cryptographically, correspond to a compliant upload, without verifying that the actual request body and headers respect the declared limits and patterns.

Additionally, this behavior touches on CWE-863: Incorrect Authorization because access decisions (which keys and content types are allowed, and under what constraints) are made without enforcing all required conditions, weakening the authorization boundary.

Potential impact

  • Attackers may upload files larger than intended limits, potentially causing storage exhaustion or increased operational costs.
  • Clients could upload objects to arbitrary keys instead of constrained prefixes, which may result in:
  • Overwriting or shadowing sensitive objects under predictable names.
  • Writing data outside of designated directories or tenants.
  • Content-Type spoofing could allow:
  • Circumvention of security controls that rely on MIME type (e.g., file scanning, browser handling).
  • Delivery of executable or unsafe content disguised as benign media.
  • Weakening of tenancy boundaries if key or size constraints are used as part of isolation or quota enforcement.
  • Potential facilitation of downstream attacks when other components trust object location, size, or type constraints.

General mitigation guidance

Effective mitigation centers on enforcing strict server-side validation of all presigned POST policy conditions:

  • Ensure the server checks content-length-range for each upload, rejecting requests that exceed maximum size or fall outside allowed ranges.
  • Validate that the object key matches the policy constraints (e.g., required prefixes via starts-with rules) before accepting the upload and writing data.
  • Confirm that the Content-Type of the incoming request adheres to the policy, and do not rely solely on client-provided values.

Additional defensive patterns include:

  • Treat presigned policies as hints for client behavior, but always re-derive and enforce the equivalent rules on the server.
  • Use layered controls such as per-tenant quotas, bucket-level limits, and background monitoring for abnormal growth to reduce impact from oversized uploads.
  • Minimize the privileges associated with presigned policies by scoping them to narrow key ranges, strict size limits, and limited lifetimes.
  • Centralize and standardize policy enforcement logic to avoid drift between signing behavior and verification behavior.

How teams detect issues like this

Organizations can detect and analyze this class of issue using several complementary approaches:

  • Static analysis and code review:
  • Look for code paths that verify signatures for presigned uploads but do not apply full validation of policy fields (content-length-range, key prefix constraints, Content-Type).
  • Review handler implementations for upload endpoints to ensure that authorization and input validation are both explicitly enforced.
  • Security testing and fuzzing:
  • Craft test cases that submit presigned POST uploads with intentionally mismatched parameters (e.g., larger body size than allowed, altered key, or different Content-Type) to observe server behavior.
  • Operational monitoring:
  • Track anomalous storage patterns such as sudden increases in object count or size, especially for tenants or buckets expected to be constrained.
  • Alert on uploads that violate expected key patterns or MIME types according to application policy, using logs or object metadata.
  • Automated policy enforcement:
  • Introduce middleware or gateway policies that independently validate request size, path, and content type before forwarding uploads to RustFS, serving as a compensating control.

Sources

SourceLink
github.comgithub.com/rustfs/rustfs/security/advisories/GHSA-w5fh-f8xh-5x3p

Frequently asked

questions

Yes. Any client that can reach the RustFS presigned POST upload endpoint and obtain a valid presigned policy can exploit the missing validation checks remotely over the network.

Typically, yes, in the sense that an attacker must obtain or be issued a presigned POST policy through some authenticated or semi-trusted workflow. However, if presigned forms are broadly distributed, leaked, or reused across users, practical access requirements may be low.

Implement mandatory server-side validation of all presigned POST policy conditions before accepting an upload. The server should enforce size limits, key constraints, and Content-Type rules derived from the policy, and reject any request that violates them, regardless of what the client sends.

Treat presigned URLs and POST policies as authorization decisions, not just convenience features. Design upload handlers so that every access control and validation rule encoded into a policy is mirrored and enforced on the server side, and incorporate security reviews and automated tests focused on policy enforcement paths.

Find out what's already
exploitable in your codebase.