reflect upon this: reflected xss and a same-origin callback
huntress ctf 2026, day 21 · web exploitation · all three modes solved
tools used: live web target capture.
the target reflected a query value into an html preview, then exposed a separate callback that returned protected evidence. the callback required the same-origin context a browser would normally provide.
the useful insight was to follow the target's own clue response and verify the reflection before requesting the callback. this avoided reusing stale routes or mistaking a reflected string for a completed solve.
challenge shape
the single and time trial each supplied a temporary web target. mastery could mix this application with an unrelated backup-file target, so the recipe had to classify each assigned target independently.
artifact anatomy
the clue endpoint named a feature route, a callback route, and a nonce. the feature route inserted the q parameter into the page's preview. the callback accepted the nonce and checked the request's browser-context headers before returning evidence.
extraction method
the solver constructs a script from the current target's callback route and nonce, sends it through q, and checks that the response contains that exact payload. only then does it request the callback with the assigned origin and a referer for the reflected page. all values are read from the current target.
callback = clues["secondary_route"]
nonce = clues["callback_nonce"]
payload = build_preview_script(callback, nonce)
page = get(clues["feature_route"], params={"q": payload})
if payload in page:
result = get(callback, params={"nonce": nonce}, origin=target_origin)
validation and answer formatting
the response must confirm the raw reflection, and the callback request must stay on the assigned origin with the expected context. the accepted result is [redacted]; no target proof is copied into this post.
failed approaches and pivots
no request transcript or failed submission was preserved in this checkout, so there is no challenge-specific failed pivot that can be verified. the method above is supported by the recovered solver description and the local target fixture.
automation across modes
the route and nonce are read afresh for each target. the same short chain works for the untimed target and the rotating timed targets; in mastery, a separate target can select its own backup recipe.
lessons
- a browser-context gate is evidence about the callback request, not a reason to guess a different endpoint.
- verify raw reflection before asking the callback for its result.
- keep every route and nonce scoped to the assigned target.
solve times
public scoreboard · day 21 finish: below top 10
- 23:03.9single#72 of 169 solvers
- 24:39.9time trial#70 of 163 solvers
- 27:07.0mastery#70 of 159 solvers
- #36team day finishof 146 teams that cleared it, in 27:16.2
- #6single orderof the day's 8, by our flag time
from the public scoreboard: 09:00 et release to our flag; the table below counts from our attempt's start.
work-to-flag, attempts, and wrong submits were not recorded in this checkout.
| mode | work to flag | attempts | wrong submits |
|---|---|---|---|
| single | not recorded | not recorded | not recorded |
| time trial | not recorded | not recorded | not recorded |
| mastery | not recorded | not recorded | not recorded |
the clock
the winning attempt start, deadline, and flag timestamp were not preserved, so available, used, and remaining time cannot be reported.
| mode | time available | time used | time left |
|---|---|---|---|
| time trial | not recorded | not recorded | not recorded |
| mastery | not recorded | not recorded | not recorded |
where we got stuck
- the local evidence pack contains no web request or timed-attempt records, so a technical stall and its duration cannot be attributed to this challenge.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}