From prompt to pwned: chaining LLM and web bugs to Admin
Quarkslab demonstrates a real-world attack chain combining insecure LLM output handling with web vulnerabilities to achieve admin account takeover from a low-privileged account. By crafting prompts that trick the LLM into reflecting unsanitized JavaScript, the attacker injects XSS via markdown and iframe elements in the chat interface. The unprotected JWT cookie (missing HttpOnly, Secure, and SameSite flags) becomes accessible, enabling session hijacking. The attack exploits three distinct vulnerability classes—prompt manipulation, insecure output handling, and weak token implementation—to escalate from user to admin, and was validated on a real production system during a red team engagement.
This post is licensed under CC BY 4.0 by the author.