-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolution for Cookie Security issue, cookie accepts cookie name, pat…
…h, and domain with out of bounds characters until version 0.6.0 (PR #5976) # Description closes security alert #80 ## Impact The cookie name could be used to set other fields of the cookie, resulting in an unexpected cookie value. For example, serialize("userName=<script>alert('XSS3')</script>; Max-Age=2592000; a", value) would result in "userName=<script>alert('XSS3')</script>; Max-Age=2592000; a=test", setting userName cookie to <script> and ignoring value. A similar escape can be used for path and domain, which could be abused to alter other fields of the cookie. ## Patches Upgrade to 0.7.0, which updates the validation for name, path, and domain. ## Workarounds Avoid passing untrusted or arbitrary values for these fields, ensure they are set by the application instead of user input. ## References jshttp/cookie#167
- Loading branch information
1 parent
10a512f
commit 7bd13fb
Showing
3 changed files
with
24 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
change-type: patch | ||
description: Resolution for Cookie Security issue, cookie accepts cookie name, path, and domain with out of bounds characters until version 0.6.0 | ||
destination-branches: [master] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters