Cross-site leaks are side channels around the same-origin policy. The attacker cannot read the response, but the browser still exposes whether a resource loaded, how long it took, whether a frame was created, or whether a cache entry existed. If that observable bit depends on a secret, the secret can be reconstructed one bit at a time.
Some HTML elements such as images, scripts and stylesheets can load cross-origin without CORS. Their onload and onerror events reveal whether the request succeeded, even though the response body stays unreadable. Search suggestions, redirects, cache behavior, frame counts and error pages can all become boolean oracles. An attacker page automates thousands of queries and combines the bits into a secret, an identity or a private state.
- Inspect the oracle response difference
- Choose a side channel that exposes the difference cross-origin
- Brute-force the secret one character at a time
- Capture the flag
Attacker origin to victim origin
Where to look before you type a payload
A victim endpoint returns a different status, length, timing or resource type depending on a secret or the victim's state.
The browser loads the endpoint as an image, script, stylesheet or frame and exposes onload, onerror, timing or frame count.
The attacker maps the observable to one bit: match or miss, exists or absent, visited or not.
A script tests candidate characters or binary-search branches, repeating measurements to reduce noise.
Open one hint at a time. The first two build the model; the last two point at the boundary.
Hint 1
Find the endpoint whose response differs for a matching prefix and observe which cross-origin signal changes.
Hint 2
Images, scripts and stylesheets expose onload and onerror without CORS; choose the element that matches the oracle's response type.
Hint 3
The oracle returns a different response for a matching prefix. Use an stylesheet link and onload/onerror to test one character at a time from XS-.
Hint 4 · near the answer
Report the attacker page to the bot; it automates the search and posts the recovered secret to /collect.
Observe → Hypothesize → Test → Prove → Explain
This is the same loop a reviewer expects in a report. Your draft stays in this browser; nothing is submitted until you choose to export it.
Evidence log
Write for a reviewer who was not in the room. Every claim needs a request, response or state change behind it.
Preview the evidence report
# Lab evidence report — The Stylesheet Side Channel - Family: XS-Leaks - Lab ID: web-xsleaks-stylesheet - Date: 2026-12-05 ## Workflow ### Observe - [ ] Open "The Stylesheet Side Channel" and record the entry point, the HTTP method and the role you are given. - [ ] List every parameter, header, cookie and object identifier the normal flow exposes. - [ ] Save a baseline response: status, body shape, timing and the fields that change by user. ### Hypothesize - [ ] Name the server decision that protects the entry point, and the evidence it should use. - [ ] Use the clue as a constraint, not an answer: The oracle returns a stylesheet for a match. A link rel=stylesheet fires onload for the matching prefix and onerror for a miss. - [ ] Predict the exact status, body or state change that would prove the decision is missing. ### Test - [ ] Start from the baseline and change one value: the oracle's cross-site onload/onerror difference. - [ ] Keep the request replayable; vary encoding, method or identifier location only after the first result. - [ ] Capture the full request and response for the winning attempt, including the flag. ### Prove - [ ] Capture the flag and name the exact foreign object, role or state change it proves. - [ ] Repeat from a clean session and confirm the result is not cached or stale. - [ ] State impact precisely: what data or action did you actually obtain? ### Explain - [ ] State the root cause without naming the payload: which decision failed? - [ ] Name the control that prevents recurrence and the layer where it belongs. - [ ] Write one regression test that fails before the fix and passes after it. ## Evidence ### Target and baseline _Not recorded._ ### Hypothesis _Not recorded._ ### Winning request _Not recorded._ ### Proof _Not recorded._ ### Root cause _Not recorded._ ### Control and regression test _Not recorded._ ## Analyst conclusion The proof demonstrates the missing control above. The regression test should fail against the vulnerable behavior and pass after remediation.
The full request, the reasoning and the debrief unlock after a successful capture. That is deliberate: struggle first, then consolidate.
False positives to rule out
- The endpoint returns the same status, length and timing for matches and misses; a theoretical side channel is not a finding.
- The response is protected by CORP or COOP and the cross-origin element cannot load it.
- The oracle only reveals public data that any unauthenticated user can read directly.
Regression tests to name
- Match and miss are indistinguishable: Status, length, content type and timing are indistinguishable within measurement noise
- Cross-origin resource is blocked: The load fails and onerror fires for both match and miss
- Authorization is required: The request is rejected before any secret-dependent branch
- Make sensitive endpoints return indistinguishable responses for matches and misses, including status, length and timing.
- Send Cross-Origin-Resource-Policy: same-origin and Cross-Origin-Opener-Policy: same-origin on sensitive resources.
- Require authentication and authorization for every state-dependent response, and avoid putting secrets in URLs or cache keys.
- Use fetch metadata and same-site cookies, and test the deployed app with the same onload, timing and cache probes an attacker would use.
XS-Leaks هي قنوات جانبية حول سياسة same-origin. المهاجم لا يقرأ جسم الاستجابة، لكنه يرى نجاح تحميل صورة أو سكربت أو ورقة أنماط، أو فرق التوقيت، أو عدد الإطارات. إذا اعتمدت هذه الإشارة على سر، يمكن إعادة بناء السر بتًا بعد بت. الحل: اجعل الردود متطابقة للمطابقة وعدمها، وأضف CORP وCOOP، واشترط المصادقة والتفويض، واختبر التطبيق بنفس أدوات onload والتوقيت والكاش.