Security implications of access and refresh tokens (JWT) with refresh token rotation and automatic reuse detection

In an effort to avoid having to deal with CSRF attacks, I’m trying to implement an auth flow that completely avoids using cookies. In most cases this makes one vulnerable to XSS attacks. However, according to this auth0 blog post, it can b… Continue reading Security implications of access and refresh tokens (JWT) with refresh token rotation and automatic reuse detection

Is there a consensus on whether HTML encoding should happen upon upload or retrieval/display for defense against stored XSS?

The common thing to do in defense against XSS, stored or not, is to HTML-encode the payload. Encoding upon the upload/POST of the data is efficient for processing power and neutralizes it early to be stored in the database but the payload … Continue reading Is there a consensus on whether HTML encoding should happen upon upload or retrieval/display for defense against stored XSS?

Mitigating CSRF and XSS with JWT authentication: can someone tell me where my logic is wrong

I’m currently working on a personal project including a RESTful API and also trying to understand how to make it as secure as possible. I have read a bit about JWT, the possible vulnerabilities as well as some suggestions on how to mitiga… Continue reading Mitigating CSRF and XSS with JWT authentication: can someone tell me where my logic is wrong

How do double quotes and angle bracket work in this scenario?

Question about a solution in portswigger academy (since portswigger explains nothing and I can’t find any info elsewhere on this):

Break out of the img attribute by searching for:

">

Here is the img attribute being broken out of:

How do the double quote and angle bracket break out of the attribute exactly? I can’t figure out how the double quotes play a role in that. Thanks

Continue reading How do double quotes and angle bracket work in this scenario?

Posted in xss

Increasing security for single page applications (SPAs)

Single page applications (SPAs) have become the most popular way to create websites that feel faster for the end-user without hitting the server every time a user interacts with an application. Shifting away from the traditional cookie-based approach, … Continue reading Increasing security for single page applications (SPAs)