Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookies com.auth0.auth.* have no secure flag #1050

Closed
azat-galiev opened this issue Oct 22, 2019 · 9 comments · Fixed by #1160
Closed

Cookies com.auth0.auth.* have no secure flag #1050

azat-galiev opened this issue Oct 22, 2019 · 9 comments · Fixed by #1160

Comments

@azat-galiev
Copy link

azat-galiev commented Oct 22, 2019

Description

Cookies created after calling to WebAuth.authorize method have no secure flag when using https protocol.

Reproduction

  1. Call WebAuth.authorize method.
  2. It will create cookie that starts with "com.auth0.auth".
  3. Even if you are using https protocol, there is no secure flag on cookie.

Environment

Please provide the following:

  • Version of this library used: 9.11.3
  • Version of the platform or framework used, if applicable: Angular 8.2.8
@joshcanhelp
Copy link
Contributor

@garyfreeman - The cookie that it's setting with that name is just a nonce/state value, something that's not important to protect and only used be Auth0.js. We set the cookie, attach the value to the authorize URL, redirect, then check the value when it comes back. There's nothing in that value that's sensitive and it's not meant to be sent anywhere.

I'll close this for now but let me know if you have any other questions here.

@joshcanhelp joshcanhelp removed their assignment Oct 22, 2019
@jgautheron
Copy link

jgautheron commented Dec 4, 2019

@joshcanhelp - Even though no critical data is stored, for some security audits, any cookie that is not secured will be a blocking issue. Any chance we could add the option to add the secure flag to the cookies?

@andrewphahn
Copy link

andrewphahn commented Dec 4, 2020

This is a blocking issue for us after having penetration test done as @jgautheron stated it could be. It seems like a simple fix, would it be possible to address this?

The co/verifier* cookies are also missing the secure flag.

@5sp
Copy link

5sp commented Mar 16, 2021

@joshcanhelp, this has been a blocking issue for us with pen test. Same as @andrewphahn and @jgautheron mentioned above.
Any ideas how to avoid/bypass this issue?

@stevehobbsdev
Copy link
Contributor

We can probably do something like what we do here in Auth0 SPA SDK, we we set the secure attribute if you're using the HTTPS scheme - does this work?

@5sp
Copy link

5sp commented Mar 16, 2021

We can probably do something like what we do here in Auth0 SPA SDK, we we set the secure attribute if you're using the HTTPS scheme - does this work?

@stevehobbsdev, this looks like a great solution.
EDIT:
From what I can see currently, com.auth0.auth*, co/verifier* and authToken are insecure.
Only com.auth0.auth* is a problem for pentesting

@stevehobbsdev
Copy link
Contributor

I've raised #1158 that should fix this, will be included in the next release 👍

@NikitaKoren
Copy link

@stevehobbsdev great job! When is next release is scheduled for?

@stevehobbsdev
Copy link
Contributor

@NikitaKoren We don't have a schedule as such, but there is a piece of work in flight that we want to put into the release as well. I anticipate being able to do a release early next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants