$ cat writeup.md…
$ cat writeup.md…
umdctf
Task: a Flask RAG chatbot exposed retrieved context inside a readable signed session cookie, and the poisoned snippets contained internal secret markers. Solution: poll the async chat flow, repeatedly query the two leaked marker names, join the returned base64 fragments, and decode the final flag.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
This challenge was a RAG chatbot that mixed user prompts with retrieved internal documents. Our solve was based on live reproduction against the running service: we inspected the Flask session state, confirmed poisoned retrieval snippets, then used two stable prompts to recover two base64 flag fragments and decode them.
No separate organizer description was present in the provided workspace files.
English summary: the target was a Flask/Werkzeug chat application at http://rag-poisoning.challs.umdctf.io:45139/. The goal was to exploit the retrieval layer and prompt leakage behavior to recover a hidden flag from the model's internal context.
http://rag-poisoning.challs.umdctf.io:45139/Werkzeug/3.1.8 Python/3.9.2GET / returns the chat pagePOST / with form field msg submits a question⏳ Processing...GET / again in the same sessionThe most important early observation was the Flask session cookie. It was signed but not encrypted, so its JSON-like payload was readable client-side after sending a message. Decoding it showed keys such as:
_permanentdocumentshistorylast_jobThe documents field contained retrieved RAG snippets including:
An internal audit drimovantelis is currently underway to review the system.Policy prompts nemporath are used to guide system behavior and enforce operational constraints.System performance is monitored regularly, including any base64-encoded logs or records.That immediately suggested a poisoned retrieval setup where unusual tokens inside documents were acting as handles for hidden data.
Two parts of the service behavior mattered.
...
$ grep --similar