2HWA—منتخب القهوة

2hwa fat7 m7aweeg

Webbeginner-friendlywhitebox

A Flask and Docker URL viewer with a sanitization blind spot. Review the source, find the gap, and turn it into a working exploit. http://16.16.25.213:8000/

Author(s)
Date

August 13, 2026

بِسْمِ اللَّـهِ الرَّحْمَـٰنِ الرَّحِيمِ

Challenge Overview

2hwa fat7 m7aweeg is a Flask and Docker web challenge authored by Mohamed Aly (@00xcanelo) for EYCC CTF 2026.

The application is a URL viewer: it accepts a link, fetches it from the server, and returns the result. Because the full source is provided, the challenge is less about guessing and more about reading the Flask app carefully, understanding how the submitted URL reaches the request layer, and finding where the sanitization stops being effective.

Video Walkthrough

Exploitation Path

  1. Review the Flask app and Docker setup — Map the routes, identify the URL-fetching endpoint, and note how the container is networked. The Docker context matters because the target you need to reach may not be exposed publicly.
  2. Trace the URL Viewer request flow — Follow the submitted URL from the frontend JavaScript to app.py. Confirm whether validation happens in the browser, on the server, or both.
  3. Find the sanitization blind spot — The filter checks the URL string, but the final request is made after the URL is parsed. A crafted URL can therefore resolve to a destination the filter did not intend to allow.
  4. Bypass the filter and retrieve the flag — Use the gap to make the server request the internal target, then read the flag from the response.

Key Takeaway

Validating a URL as a string is not the same as validating where the request will actually go. Resolve and enforce the destination at the point of the request, not just at the edge of the input.

Other challenges from EYCC CTF 2026