Cross-Site Request Forgery (CSRF) in pterodactyl/panel
Reported on
Nov 15th 2021
Description
Following state-changing endpoints are vulnerable to CSRF:
1: GET /admin/nodes/view/1/settings/token (auto-generates token when token not generated yet)
2: GET /admin/settings/mail/test (The X-CSRF-Token header for the API request is not validated on backend, should be a POST request to make things easy imo)
Proof of Concept
<a href="http://[pterodactyl-url]/admin/settings/mail/test">CLICK ME!</a>
<a href="http://[pterodactyl-url]/admin/nodes/view/1/settings/token">CLICK ME!</a>
Impact
This vulnerability is capable of tricking admin users to spam unwanted test emails to admin user / token generation
Occurrences
configuration.blade.php L71L88
generate token frontend
admin.php L69
test mail api
mail.blade.php L137L161
test mail frontend
admin.php L156
generate token api
MailController.php L110L120
test mail backend (x-csrf-token not validated)
Dear @admin, please remove CVE as per maintainers wishes in this report https://huntr.dev/bounties/2a082a11-b41e-4155-afaf-3f93a0bc23c6/
@admin please do not create a CVE, this project uses GitHub for security alerting and CVE handling.
https://github.com/pterodactyl/panel/security/advisories/GHSA-wwgq-9jhf-qgw6
I have informed @admin via Discord. There is a delay between report validation and CVE creation, so not to worry.