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

Harden against HTTP cookie-based attacks #7962

Open
DemiMarie opened this issue Oct 10, 2015 · 2 comments
Open

Harden against HTTP cookie-based attacks #7962

DemiMarie opened this issue Oct 10, 2015 · 2 comments

Comments

@DemiMarie
Copy link

@DemiMarie DemiMarie commented Oct 10, 2015

This paper demonstrates several cookie-based attacks. Servo (and all browsers) needs to implement the hardening described in the paper on page 719. Specifically:

  1. A browser MUST NOT accept a cookie presented
    in an HTTP response with the secure flag set, nor
    overwrite an unexpired secure cookie, except the
    case in 5.
  2. Cookies with the secure flag MUST be given
    higher priority over non-secure cookies.
  3. A browser MUST only send the highest priority
    cookie for any cookie name.
  4. In removing cookies due to a too-full cookie store,
    the browser MUST NOT remove a secure cookie
    when there are non-secure cookies that can be removed.
  5. The browser MUST allow an HTTP connection
    to clear a secure cookie by setting an alreadyexpired
    expiration date, but the browser MUST
    NOT remove the cookie from the store. Instead,
    the browser MUST set the “do not send” flag and
    maintain the original expiration date.
  6. The browser MUST NOT send a cookie with the
    “do not send” flag, nor send any non-secure cookie
    with the same name.
  7. When issuing a request, the browser MUST rank the
    cookie list by a) presence of the secure flag, and b)
    specificity of the domain scope.
@jdm jdm added the A-network label Oct 10, 2015
@jdm
Copy link
Member

@jdm jdm commented Oct 10, 2015

Thanks for filing this! It would be super valuable to write WPT tests for each of these cases; 1, 2 and 3 should be relatively straightforward, while 4 is probably unrealistic to test across all browsers.

@nox
Copy link
Member

@nox nox commented Apr 8, 2017

Assigning @avadacatavra and myself to this.

@jdm jdm unassigned nox and avadacatavra Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.