Skip to content
XSS Write-up Beginner

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.

p.ra.dee.p_0xx01 Follow

Published on medium.com

During enumeration of scoped domains (.target.com), i have detected that there is running Web Framework called “Laravel”.

Professor.0xx01, on medium.com

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

  1. Enumerate the scoped domains and identify that Laravel is in use.
  2. Find the Ignition execute-solution endpoint, which returned a method-not-allowed response.
  3. Browse the endpoint and observe that the Ignition debug error page is shown.
  4. 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.

More by p.ra.dee.p_0xx01

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.