Linked Questions

22
votes
5answers
17k views

Should login and logout action have CSRF protection?

I am making a web application in Django which generates and includes CSRF tokens for sessions (a Django session can be anonymous or a registered user). Should I keep CSRF protection to the controllers ...
6
votes
3answers
3k views

Is it secure not to have csrf protection in login forms?

I have noticed that WordPress doesn't have csrf protection for their admin panel login /wp-admin/. Does it actually posses any potential risk? Is there any possible ways there an attacker could ...
2
votes
3answers
235 views

Web site accepting authentication via GET

There is a sign-in form on the website, which submits login/password via POST method. Problem is, that code, which accepts login/password and authenticate user also accepts it via GET method (also, if ...
18
votes
2answers
12k views

Double Submit Cookies vulnerabilities

Is the Double Submit Cookies mechanism vulnerable anything other than XSS and sub-domain attacks? All CSRF protection mechanisms are vulnerable to XSS, so that's nothing new. I'm just wondering if I ...
12
votes
2answers
5k views

Why is referer checking needed for Django to prevent CSRF

Today I learned that Django's CSRF protection uses refer(r)er header checking in addition to checking a hidden form field against a cookie. It seems to be important, judging from docs and issue below. ...
3
votes
2answers
942 views

token based authentication attacks

JSON Web Token seems to be a very good tool to authenticate users. But I wonder if an attacker can take the token used by another user and use it for his own attacks. And to be more precise what makes ...
2
votes
2answers
1k views

Will Wordpress nonces protect against Login CSRF?

Can Wordpress Nonces be used to protect against Login CSRF? https://codex.wordpress.org/WordPress_Nonces I glanced through the code for the function and it seems to only be using the User ID for ...
2
votes
2answers
2k views

How to avoid session fixation (Login CSRF) by MitM attack without HSTS?

I'm writing a web app that already uses TLS encrypted connections (HTTPS), Secure; HttpOnly session cookie, HMAC-SHA1 CSRF token, requires correct Referer header to avoid Login CSRF and changes ...
1
vote
2answers
299 views

Can a “client-initiated” session cookie provide more privacy and security than existing session alternatives?

There are several uses for a cookie, and I would like to offer some kind of guarantee that a cookie is being used for a specific, limited purpose and scope. In my case, I want to prove that a cookie ...
0
votes
2answers
523 views

Should we prevent this login XSS attack?

Setup Restful API and thin JS web client Login POST Endpoint using parameters email and password Access-Control-Allow-Origin is set, so responses can only be retrieved from non attacker website. ...
0
votes
2answers
84 views

What conditions allow an attacker to write a cookie?

Some CSRF protection mechanisms are vulnerable to attackers who can write cookies. Others are not but incur extra complexity or computational cost. Help me understand the cost/benefit. What ...
6
votes
1answer
665 views

Understanding CSRF attack prevention

I've read multiple topics about web-specific attacks and preventions, but I'm still not sure if I got the point. Let's imagine that we have a website (myapp.com) and a web service (myapi.com). The ...