FlagYard CTFWeb
FlowDesk / LinguaDesk
The app serves localized routes under /en/, /ar/, /fr/. The admin export desk at /en/admin/export returns 403 for a normal employee.
- Competition
FlagYard CTF
- Category
- WebHard (صعب)
- Source status
- Source-documented · not platform-verified
- Document
- PDF edition3 min read
Brief
The challenge
- Category
- WEB
- Difficulty
- Hard (صعب)
- Target
http://<instance>.playat.flagyard.com
FlowDesk is a workflow automation SaaS... Create an account and see how far a new workspace can actually reach. FLAG @ /run/secrets/flag
The deployed app is actually LinguaDesk, a small localization employee portal. The flag turns out to be embedded in an admin-only export, reachable through a case-sensitivity bug in the authorization layer.
TL;DR
The app serves localized routes under /en/, /ar/, /fr/. The admin export desk at /en/admin/export returns 403 for a normal employee. Express matches routes case-insensitively, but the admin guard compares the path case-sensitively, so requesting /en/ADMIN/export reaches the handler while skipping the role check. From there the export's download link points to an internal file that contains the flag.
/en/admin/export → 403 Forbidden (employee)/en/ADMIN/export → 200 OK (guard bypassed) → /en/ADMIN/export/weekly-backup → download: /internal/files/export_93ac.json → /internal/files/export_93ac.json → { "flag": "FlagY{...}" }01
Recon
The root redirects to /login. The login page is branded LinguaDesk and helpfully pre-fills an issued account:
Username:
lina.faroukPassword:
desk-4419
Logging in via POST /en/api/login sets a signed session cookie:
ld_session=<base64url({"uid":"emp_1042","exp":...})>.<base64url(HMAC-SHA256)>The dashboard shows a desk directory (Lina — employee, Camille — employee, Samir — administrator) and an Archive export card linking to /en/admin/export, noting that "Only platform administrators can produce them."
02
Dead ends
Session forgery: The signature is validated correctly — tampering with the payload, dropping the signature, or omitting it all return
401. A quick HMAC key brute with common secrets found nothing.Locale traversal: Locale is strictly validated (
en/ar/fr); anything else returns{"error":"Unsupported locale"}.Registration: Despite the "create an account" hint, no signup/register endpoint exists (all
404)./en/admin/exportreturns403 Forbiddenfor the employee session.
04
Reaching the flag
Requesting the ready export returns its internal download path:
GET /en/ADMIN/export/weekly-backup{ "filename": "weekly-backup.json", "download": "/internal/files/export_93ac.json"}Fetching that file (also gated behind the same bypassed session) returns the archive — with the flag inline:
GET /internal/files/export_93ac.json{ "export": "weekly-backup", "generated": "2026-03-29T02:10:00Z", "note": "Internal archive for the localization desk.", "flag": "FlagY{c474f1f77215b95f0f934a4521e2faab}"}Path-traversal attempts on /internal/files/ were not needed; the flag ships inside the weekly backup.
Solve steps
Log in with the issued account
lina.farouk/desk-4419to get a validld_session.Confirm
/en/admin/exportis403for the employee role.Bypass the role guard with the case variant:
GET /en/ADMIN/export.Read the ready export:
GET /en/ADMIN/export/weekly-backup→ download link/internal/files/export_93ac.json.Fetch that internal file and read the
flagfield.
Flag
Flag
FlagY{c474f1f77215b95f0f934a4521e2faab}
Source-documented · not platform-verified
Takeaways
Authorization checks must normalize the path exactly the way the router does. A case-insensitive router plus a case-sensitive guard is a classic broken-access-control bypass.
When a signed token can't be forged, pivot to the routes it protects rather than the token itself.