For the complete documentation index, see llms.txt. This page is also available as Markdown.

Laravel

Laravel apps may expose framework-specific cookies such as XSRF-TOKEN and an application session cookie. If APP_DEBUG can be enabled, Laravel 8.4.0 can be vulnerable to CVE-2021-3129 through Ignition.

Discovery

Useful HTTP indicators:

WhatWeb may show Laravel-style cookies:

Cookies[XSRF-TOKEN,lavita_session]
HttpOnly[lavita_session]

Directory enumeration can also find compiled frontend assets and Laravel auth routes:

feroxbuster -u http://TARGET/ -Eg -t 10 -w /md/wl/raft-small-directories.txt

Useful hits:

200  http://TARGET/js/app.js
200  http://TARGET/password/reset
200  http://TARGET/register
405  http://TARGET/logout
200  http://TARGET/login

The Laravel version may be exposed on error pages:

http://TARGET/pagenothere
Laravel 8.4.0

Enable Debug Through Dashboard

If registration is open, create an account and log in:

After login, the dashboard may expose a debug toggle:

Toggle it to:

CVE-2021-3129 Ignition RCE

Use the public CVE-2021-3129 exploit:

Successful output:

Stage an ELF reverse shell:

Download, chmod, and execute it through the Laravel RCE:

Successful shell context:

Post-Exploitation

Read the Laravel .env file:

Useful values:

Connect to MySQL locally:

Useful database enumeration:

References

  • https://github.com/joshuavanderpoll/CVE-2021-3129

  • https://github.com/ambionics/phpggc

Last updated