Skip to content
XSS Write-up Beginner

How I Found Critical Vulnerabilities in a Laravel Website: A Pen

The platform exposed public storage directories without authentication, allowing anyone to browse and download sensitive files. It also reflected unsanitised input in the msg parameter and stored unsanitised HTML in profile fields, enabling script execution in victims' browsers.

Hamed Esam Follow

Published on medium.com

During a recent penetration test of an AI-driven platform (anonymized as “AI Platform X”), I uncovered severe security flaws that exposed sensitive user data, allowed arbitrary code execution, and risked account compromise. The platform specializes in text-to-speech and AI-generated multimedia content.

Hamed Esam, 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 missing access controls and output encoding: directory listing was enabled on public storage, and user input was embedded into pages and profile fields without sanitisation.

Impact

Attackers could download over 15,000 sensitive files, potentially modify or delete them if write permissions were misconfigured, and execute scripts in victims' browsers to steal sessions or credentials.

What the attacker needed

None for storage access; victim clicks a crafted link for reflected XSS; attacker can update a profile for stored XSS

The fix

The report recommends sanitising and encoding all user input, securing file storage outside public directories, and adopting defence-in-depth measures such as CSP and HTTP-only cookies.

How it was found

  1. Navigate to the public storage directory URL.
  2. Observe the directory listing and freely downloadable files.
  3. Navigate to the register page with a crafted msg parameter.
  4. Observe the alert box appearing.
  5. Intercept the profile update request.
  6. Visit the attacker's profile to trigger the stored payload.

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.

A website stored files in a folder that anyone on the internet could open and read, like leaving a filing cabinet unlocked in a public lobby. Separately, some pages echoed back whatever text was put in the web address without cleaning it, so an attacker could make a victim's browser run their code. Profile pages also saved raw HTML, so malicious scripts stayed there and ran for anyone who viewed the profile.

What is XSS?

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

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.