Skip to content
RCE Write-up Beginner

Hackviser — Laravel Framework < 8.4.2 Uzaktan Kod Yürütme (CV

The Ignition debug component in Laravel before 8.4.2 exposes an endpoint that processes user-supplied data without adequate filtering, allowing arbitrary PHP code execution. An attacker can send a crafted HTTP request to run commands on the server and read files such as a secret file.

Who4m1-Cyber Follow

Published on medium.com

Sizlerle bu gün app.hackviser.com üzerinde olan bir laboratuvar zaafiyetini inceleyeceğiz.

Who4m1-Cyber, 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 endpoint was reachable because debug mode was enabled in production, and it evaluated user-supplied solution data without proper validation.

Impact

An attacker could run arbitrary commands on the server and read sensitive files, but only when debug mode is enabled in the environment.

What the attacker needed

APP_DEBUG enabled in production; network access to the target

The fix

The vulnerability was fixed in Laravel 8.4.2, and debug mode should not be left enabled in production.

How it was found

  1. Open the CVE-2021 lab in the Hackviser labs section.
  2. Start msfconsole and search for the exploit by the vulnerability name.
  3. Select the exploit and run show options.
  4. Set RHOSTS to the target IP and LHOST to your own IP.
  5. Run the exploit to obtain a shell.
  6. Change to the root directory, list files, and read the secret file.

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 in PHP. A debugging helper called Ignition was left switched on in a live environment, and it accepted instructions from anyone who asked. That let a stranger run their own code on the server, as if they were the site owner.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.