The bucket was never the secret: object storage exposure and presigned URL abuse
Public buckets, leaked credentials and over-scoped presigned URLs are three different object-storage failures with one outcome. MinIO CVE-2023-28432 shows why the keys, not the objects, are the prize.
By Ahmed PingerPublished
9 min read13 views
Most write-ups about "an exposed S3 bucket" collapse three different failures into one headline. They are not the same bug, they do not have the same fix, and only one of them is the one people actually check for.
Pull them apart first, because everything below depends on the distinction.
- Anonymous object access. The bucket policy or ACL lets an unauthenticated caller list and read objects. This is the one every scanner finds.
- Credential disclosure. The storage service, or something next to it, hands out the access key and secret. Now the attacker is not reading one bucket, they are authenticated as the service to every bucket.
- Presigned URL abuse. A signed URL grants more than it should: too long a lifetime, the wrong method, or a scope that covers more than one object.
The first is a configuration problem on a single resource. The second and third are the ones that turn a finding into an incident, and they are the two this post is about.
Why the same word covers very different risk
"Object storage is exposed" can mean a marketing PDF is world-readable, which is often intended. It can also mean the root credential for a distributed store is sitting in an HTTP response. The word does not tell you which, and the gap between them is the whole assessment.
The useful question is never "is the bucket public." It is "what can the caller reach from here, and as whom." A public object is a leaf. A leaked signing key is the trunk. Presigned URLs sit in between: they are capability tokens, and a capability token that outlives its purpose or over-scopes its grant is a standing credential that nobody is rotating.
The real one: MinIO CVE-2023-28432
MinIO is a widely deployed S3-compatible object store. In a cluster (distributed) deployment, versions starting with RELEASE.2019-12-17T23-16-33Z and prior to RELEASE.2023-03-20T20-16-18Z answered an unauthenticated request to an internal bootstrap endpoint by returning the process environment. The CVE record is blunt about what that environment contained:
MinIO returns all environment variables, including
MINIO_SECRET_KEYandMINIO_ROOT_PASSWORD, resulting in information disclosure.
That is CVE-2023-28432, scored 7.5 (CVSS 3.1, CWE-200, Exposure of Sensitive Information to an Unauthorized Actor). CISA added it to the Known Exploited Vulnerabilities catalog on 2023-04-21, so this is not a theoretical read. An unauthenticated caller who could reach the service got the root credentials for the entire deployment, which is the second failure class in its purest form. No bucket was "public." The store simply told the internet its own password.
The exploitation request is short and public, and it is omitted here on purpose, in the same spirit as the rest of this blog: this is a triage and remediation piece, not a copy-paste weapon. What matters for a defender is the shape. The disclosure was unauthenticated, it returned a secret rather than data, and it was reachable by anyone who could open a TCP connection to the API port. Every one of those three properties is something you can check for without the exploit.
A lab you can build without Docker
You can rehearse the object-storage surface on a single throwaway Linux VM, no container runtime required. MinIO ships as a single Go binary, and the mc client is a second binary. Neither needs Docker. One caveat before the first download: the open-source MinIO server and client are archived, MinIO no longer serves or patches them, and the binaries below are pinned GitHub release assets from March 2023. They are unmaintained software with every issue found since still in them, so keep the VM disposable, bind the server to loopback, and expose nothing.
# On a disposable Linux VM. Pinned, archived releases: never expose these.
curl -Lo minio https://github.com/minio/minio/releases/download/RELEASE.2023-03-20T20-16-18Z/minio.linux-amd64.RELEASE.2023-03-20T20-16-18Z
curl -Lo mc https://github.com/minio/mc/releases/download/RELEASE.2023-03-23T20-03-04Z/mc.linux-amd64.RELEASE.2023-03-23T20-03-04Z
chmod +x minio mc
# Run a local, single-node server bound to loopback only.
export MINIO_ROOT_USER=labadmin
export MINIO_ROOT_PASSWORD=$(head -c18 /dev/urandom | base64)
./minio server /tmp/miniodata --address 127.0.0.1:9000 --console-address 127.0.0.1:9001 &
# Point the client at it and make a bucket with a file in it.
./mc alias set lab http://127.0.0.1:9000 labadmin "$MINIO_ROOT_PASSWORD"
./mc mb lab/reports
echo "quarterly numbers" | ./mc pipe lab/reports/q3.txt
Now make each failure visible, and only the first one on purpose.
# 1. Anonymous read. Watch the access change from "denied" to "anyone".
./mc anonymous set download lab/reports
curl -s http://127.0.0.1:9000/reports/q3.txt # now returns the object body
# 2. A presigned URL, and its lifetime. Read the expiry in the query string.
./mc share download --expire 168h lab/reports/q3.txt
# The URL carries X-Amz-Expires and X-Amz-Date. 168h is a week-long bearer token.
The lesson is in the second command. A presigned URL is a signed statement that says "whoever holds this may perform this method on this key until this timestamp, or until the signing credential is revoked." Set the expiry to a week and you have minted a week-long credential that survives being pasted into a ticket, a chat log, or a browser history. The pinned server build is the release that closed the disclosure, so the lab does not reproduce CVE-2023-28432, and it is not meant to. It reproduces the surface: public objects, signed URLs, and where their scope lives.
Finding it in code and configuration
The credential-disclosure and presigned classes are both visible in source before they are visible in a scan.
For presigned URLs, grep for the generation call and look at the expiry argument:
# AWS SDKs and compatible clients
grep -rniE "presign|generate_presigned_url|GetPreSignedURL|PresignGetObject" .
grep -rniE "expires?in|X-Amz-Expires|SetExpires|WithExpires" .
Two smells: an expiry measured in days rather than minutes, and a presign call whose method or key is derived from user input without a bound. A PutObject presign handed to a client is an upload capability; if the key is attacker-controlled, that is an arbitrary write into your bucket.
For public access and root credentials in infrastructure code:
grep -rniE "acl.*public-read|BlockPublicAcls|IgnorePublicAcls|RestrictPublicBuckets" .
grep -rniE "MINIO_ROOT_PASSWORD|MINIO_SECRET_KEY|AWS_SECRET_ACCESS_KEY" .
A storage service that reads its root credential from an environment variable is fine until that service also has an endpoint that reflects its environment. The MinIO bug was exactly that pairing. When you review a service that holds a master credential, the question to write on the ticket is: what does this process expose that could echo its own configuration back out.
Fixing it
In order of how much they buy you:
Block public access at the account and bucket level. On AWS, the S3 Block Public Access settings override permissive bucket policies and ACLs. Turn all four on at the account level and leave exceptions to deliberate, reviewed cases. This closes the first failure class wholesale.
Scope and shorten presigned URLs. A presigned URL should cover one object, one method, and the shortest lifetime the workflow tolerates: minutes, not days. Do not build a presign whose key comes straight from untrusted input. Treat every issued URL as a credential you cannot revoke individually once it leaves your process: it works until it expires or until the credential that signed it is revoked, deleted or deactivated, which also ends every other URL that credential signed.
Keep master credentials off reflective surfaces, and patch while patching is still possible. RELEASE.2023-03-20T20-16-18Z closed CVE-2023-28432, but the open-source MinIO server and client have since been archived: the download site now answers 410 Gone, and the repository README states that it is no longer maintained and that legacy binaries will not receive updates. A self-hosted MinIO is on a fixed patch level for good, so upgrading is a one-time step, not a durable control. The decision is to migrate to an object store that still receives fixes, or to keep running this one with that risk written down and accepted. More generally, a service that holds a root credential should not have any unauthenticated endpoint that returns configuration, environment, or debug state. That is a design rule, not a version.
Rotate what may have leaked. If a store ran a vulnerable MinIO build while reachable, or a long-lived presigned URL went somewhere you do not control, the credential is burned. Rotate it. A patch does not un-disclose a secret.
Detecting it
The disclosure classes leave different traces, and both are cheaper to watch than to clean up after.
- Anonymous access in the object-store access logs. Enable S3 server access logging or the MinIO audit target, then alert on successful
GetObjectandListBucketwith no principal. A rising count of anonymous reads on a bucket that should have none is the whole signal. - Credential use from new places. In CloudTrail, an access key that suddenly calls
ListBucketsfrom an unfamiliar network or region is the tell that a key has left the building. This is where the object-storage story meets the credential-theft story that SSRF to cloud takeover: IMDS and Capital One and SSRF past IMDS: Docker 2375 and kubelet 10250 cover: the exit is different, the stolen key behaves the same, so hunt on the key's behaviour rather than on how it left. - Scanning for the MinIO bug specifically. GreyNoise tracks internet-wide attempts against the MinIO information-disclosure endpoint. If your store faces the internet, an inbound hit on the bootstrap path is worth a page, and outbound egress from that host immediately after is worth more.
Take this away
An exposed bucket is usually the least interesting way object storage hurts you. The two that end an evening are the store handing out its own keys and a signed URL that grants more than anyone remembered. Both are credential problems wearing a storage costume. CVE-2023-28432 is the clean example: nothing was "public," the service just returned its root password to an unauthenticated caller, and the fix was a patch plus a rotation, not a policy tweak.
Check the keys and the signatures, not just the ACLs. The bucket was never the secret.
Further reading
- MinIO security advisory GHSA-6xvq-wj2x-3h3q (CVE-2023-28432): the vendor's own advisory and affected ranges
- MinIO RELEASE.2023-03-20T20-16-18Z release notes: the fixed build
- MinIO repository README: the repository is archived and read-only, and its README states it is no longer maintained and that legacy binaries will not receive updates
- CISA Known Exploited Vulnerabilities Catalog: CVE-2023-28432, added 2023-04-21
- GreyNoise: MinIO information disclosure background: observed exploitation context
- AWS: using presigned URLs: scope, method and expiry semantics
- AWS: S3 Block Public Access: the account and bucket controls
Was this useful?
Get the next write-up by email
New technical write-ups by email when we publish. No sales sequence, and every email has an unsubscribe link.
Prefer a feed? RSS. How we handle your address: privacy notice.
Comments
Loading comments…