F
Filament6mo ago
阿lam

CSRF issue on passing ZAP Security Test

I go some medium Risk Level after User scan the website. I am using the "Filament Form" to do some filtering select options. Got following description in the report No Anti-CSRF tokens were found in a HTML submission form. A cross-site request forgery is an attack that involves forcing a victim to send an HTTP request to a target destination without their knowledge or intent in order to perform an action as the victim. The underlying cause is application functionality using predictable URL/form actions in a repeatable way. The nature of the attack is that CSRF exploits the trust that a web site has for a user. By contrast, cross-site scripting (XSS) exploits the trust that a user has for a web site. Like XSS, CSRF attacks are not necessarily cross-site, but they can be. Cross-site request forgery is also known as CSRF, XSRF, one-click attack, session riding, confused deputy, and sea surf. CSRF attacks are effective in a number of situations, including: The victim has an active session on the target site. The victim is authenticated via HTTP auth on the target site. The victim is on the same local network as the target site. CSRF has primarily been used to perform an action against a target site using the victim's privileges, but recent techniques have been discovered to disclose information by gaining access to the response. The risk of information disclosure is dramatically increased when the target site is vulnerable to XSS, because XSS can be used as a platform for CSRF, allowing the attack to operate within the bounds of the same-origin policy. some items like <form wire:submit="submitForm"> No known Anti-CSRF token [anticsrf, CSRFToken, RequestVerificationToken, csrfmiddlewaretoken, authenticity_token, OWASP_CSRFTOKEN, anoncsrf, csrf_token, _csrf, _csrfSecret, csrf_magic, CSRF, _token, _csrf_token] is there any idea to solve this?
2 Replies
DrByte
DrByte6mo ago
Does this only occur when the Forms package is used separate from the main Filament package (which includes Panels, Forms, Tables, etc)? Filament is based on Livewire and Laravel, and Livewire uses CSRF tokens natively for everything, and Laravel's default middleware stack blocks any form submissions that don't contain a valid CSRF token ... so what you're reporting is quite unexpected ... unless you've removed the Laravel middleware that handles CSRF tokens.
阿lam
阿lam6mo ago
yes : Forms package is used separate from the main Filament package
Want results from more Discord servers?
Add your server
More Posts