Back to Findings
CSRF Token Not Validated on State-Changing Requests
MediumOpenCVSS 3.1: 6.1CWE-352
Description
Several state-changing POST endpoints do not validate CSRF tokens, allowing an attacker to craft malicious pages that perform actions on behalf of authenticated users.
Proof of Concept
Host a page with `<form action='https://app.tamkeen.sa/api/settings' method='POST'><input name='email' value='attacker@evil.com'/></form><script>document.forms[0].submit()</script>`. When a logged-in user visits the page, their email is changed.
Remediation
Implement anti-CSRF tokens using the Synchronizer Token Pattern. Use SameSite=Strict cookie attribute. Verify the Origin header on state-changing requests.
Details
Affected Assethttps://app.tamkeen.sa/api/settings
CVSS Score6.1
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CWECWE-352
References

