PutObject with ?versionId= lets a writer overwrite an existing object version without DeleteObjectVersion permission
概要
Summary
On a versioning-enabled bucket, any principal that holds only s3:PutObject on a key can overwrite the content of an existing, specific object version by sending PUT /bucket/key?versionId=<existing-version-id>. The version keeps its id and the old content is replaced in place, so a w...
影響パッケージ
| 種類 | パッケージ | 影響を受ける版 | 直った版 |
|---|---|---|---|
| rust | rustfs |
<= 1.0.1 |
1.0.2 |
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
Summary
On a versioning-enabled bucket, any principal that holds only s3:PutObject on a key can overwrite the content of an existing, specific object version by sending PUT /bucket/key?versionId=. The version keeps its id and the old content is replaced in place, so a writer without s3:DeleteObjectVersion can rewrite object history that versioning is meant to preserve. The same applies to browser POST uploads carrying ?versionId=.
Details
rustfs/src/app/object/put.rspassesPutObjectInput.version_id(taken from theversionIdquery parameter) intoput_opts_with_replication_authorization.rustfs/src/storage/options.rsput_opts_with_replication_authorizationuses that queryvidunconditionally; only the header fallback (SUFFIX_SOURCE_VERSION_ID) is gated onreplication_request_authorized. The resultingopts.version_idmakes the write replace that version.- The
put_objectaccess hook asks only fors3:PutObject(rustfs/src/storage/access.rsaround line 3175); no version-specific or delete-version permission is required. - Object-locked versions are protected by
validate_existing_object_lock_for_write; unlocked versions are not. - Reproduced (2026-09-30) against a debug build of RustFS main served by the current HTTP stack: after
PUT key(10 bytes) on a versioned bucket,PUT key?versionId=with 20 bytes left a single version with the same id whose content is the new 20 bytes.
Impact
Integrity: a principal limited to `s3:…
出典: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV
参照URL
- GITHUB_REPO_ADVISORY rustfs/rustfs