Summary
The GodObjectProfile action mutates state via GET query parameters, enabling CSRF attacks.
Steps to reproduce
- Navigate to /Home/GodObjectProfile
- Observe anchor links like <a href="?action=update&field=Name&value=UpdatedName">\
- Embed that URL on an external page
- When a logged-in user visits the external page, their profile data is mutated without consent
Expected behavior
State-changing operations should only be possible via POST requests with anti-forgery tokens. GET requests should be read-only.
Actual behavior
GET requests with query parameters (?action=update&field=Name&value=...) mutate application state. Any external site can trigger these mutations by embedding the URL.
Relevant logs/stack traces
N/A — no error produced; the vulnerability is silent.
Environment
.NET 9, all browsers, all OS
Impact
Additional context
Files affected: \Controllers/HomeController.cs, \Views/Home/GodObjectProfile.cshtml\
Fix required:
- Convert state-changing operations to POST requests
- Add [HttpPost]\ and [ValidateAntiForgeryToken]\ attributes
- Use form submissions instead of anchor links for mutations
- Ensure GET requests are read-only
Summary
The GodObjectProfile action mutates state via GET query parameters, enabling CSRF attacks.
Steps to reproduce
Expected behavior
State-changing operations should only be possible via POST requests with anti-forgery tokens. GET requests should be read-only.
Actual behavior
GET requests with query parameters (?action=update&field=Name&value=...) mutate application state. Any external site can trigger these mutations by embedding the URL.
Relevant logs/stack traces
N/A — no error produced; the vulnerability is silent.
Environment
.NET 9, all browsers, all OS
Impact
Additional context
Files affected: \Controllers/HomeController.cs, \Views/Home/GodObjectProfile.cshtml\
Fix required: