You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
{
"actions": [
{
"action": "review",
"module": "cookie",
"resolves": [
{
"id": 1099846,
"path": ".>@sveltejs/kit>cookie",
"dev": false,
"optional": false,
"bundled": false
}
]
}
],
"advisories": {
"1099846": {
"findings": [
{
"version": "0.6.0",
"paths": [
".>@sveltejs/kit>cookie"
]
}
],
"found_by": null,
"deleted": null,
"references": "- https://github.com/jshttp/cookie/security/advisories/GHSA-pxg6-pf52-xh8x\n- https://github.com/jshttp/cookie/pull/167\n- https://github.com/jshttp/cookie/commit/e10042845354fea83bd8f34af72475eed1dadf5c\n- https://github.com/advisories/GHSA-pxg6-pf52-xh8x",
"created": "2024-10-04T20:31:00.000Z",
"id": 1099846,
"npm_advisory_id": null,
"overview": "### Impact\n\nThe 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`.\n\nA similar escape can be used for `path` and `domain`, which could be abused to alter other fields of the cookie.\n\n### Patches\n\nUpgrade to 0.7.0, which updates the validation for `name`, `path`, and `domain`.\n\n### Workarounds\n\nAvoid passing untrusted or arbitrary values for these fields, ensure they are set by the application instead of user input.\n\n### References\n\n* https://github.com/jshttp/cookie/pull/167",
"reported_by": null,
"title": "cookie accepts cookie name, path, and domain with out of bounds characters",
"metadata": null,
"cves": [
"CVE-2024-47764"
],
"access": "public",
"severity": "low",
"module_name": "cookie",
"vulnerable_versions": "<0.7.0",
"github_advisory_id": "GHSA-pxg6-pf52-xh8x",
"recommendation": "Upgrade to version 0.7.0 or later",
"patched_versions": ">=0.7.0",
"updated": "2024-10-04T20:31:01.000Z",
"cvss": {
"score": 0,
"vectorString": null
},
"cwe": [
"CWE-74"
],
"url": "https://github.com/advisories/GHSA-pxg6-pf52-xh8x"
}
},
"muted": [],
"metadata": {
"vulnerabilities": {
"info": 0,
"low": 1,
"moderate": 0,
"high": 0,
"critical": 0
},
"dependencies": 528,
"devDependencies": 0,
"optionalDependencies": 0,
"totalDependencies": 528
}
}
The text was updated successfully, but these errors were encountered:
htran-ubed
changed the title
Vulnarabilite in depenency, cookie 0.6.0
Vulnerability in dependency, cookie 0.6.0
Apr 15, 2025
Describe the bug
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.
Reproduction
npm audit
Logs
System Info
Severity
annoyance
Additional Information
The text was updated successfully, but these errors were encountered: