Found Bug: Cross-Site Scripting (XSS) in Laravel Debug Mode !!
A Laravel application had Ignition debug mode enabled, and a crafted path under the Ignition scripts endpoint was reflected into the debug error page without sanitisation. An attacker could get script to run in a victim's browser by sending them a link to that crafted URL.
Published on medium.com
During enumeration of scoped domains (.target.com), i have detected that there is running Web Framework called “Laravel”.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the Ignition debug error page reflected the requested path into its HTML output without encoding it, so markup in the URL was rendered as HTML.
Impact
An attacker could run script in a victim's browser on the affected site if the victim opens a crafted link, which could be used to act as the victim; the report does not demonstrate anything beyond an alert.
What the attacker needed
Laravel Ignition debug mode enabled; victim clicks a crafted link
The fix
Debug mode should be disabled in production and the Ignition package updated, so error pages no longer reflect request data.
How it was found
- Enumerate the scoped domains and identify that Laravel is in use.
- Find the Ignition execute-solution endpoint, which returned a method-not-allowed response.
- Browse the endpoint and observe that the Ignition debug error page is shown.
- Request the Ignition scripts path with crafted markup appended and see the script run in the debug page.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Laravel is a popular tool for building websites, and Ignition is its built-in debugging helper. When debug mode is left on in production, error pages can show back whatever text you put in the address, and if that text includes HTML the browser will run it as code. That lets an attacker make a link that runs their script on the real site when someone clicks it.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.