- Description
- JavaScript Cookie is a JavaScript API for handling cookies, client-side. Prior to version 3.0.7, js-cookie's internal assign() helper copies properties with for...in + plain assignment. When the source object is produced by JSON.parse, the JSON object's "__proto__" member is an own enumerable property, so the for…in enumerates it and the target[key] = source[key] write triggers the Object.prototype.__proto__ setter on the fresh target ({}). The result is a per-instance prototype hijack: Object.prototype itself is untouched, but the merged attributes object now inherits attacker-controlled keys. Because the consuming set() function then enumerates the merged object with another for...in, every key the attacker placed on the polluted prototype lands in the resulting Set-Cookie string as an attribute pair. The attacker can set domain=, secure=, samesite=, expires=, and path= on cookies whose attributes the developer thought were locked down. This issue has been patched in version 3.0.7.
- Source
- security-advisories@github.com
- NVD status
- Modified
- Products
- javascript_cookie, 3scale_api_management, ansible_automation_platform, openshift_ai, openshift_lightspeed, enterprise_linux
[
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:js-cookie:javascript_cookie:*:*:*:*:*:node.js:*:*",
"matchCriteriaId": "49EF678B-9E16-4A9D-9612-8E142C330086",
"versionEndExcluding": "3.0.7",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
},
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:redhat:3scale_api_management:2.0:*:*:*:*:*:*:*",
"matchCriteriaId": "C5434CC8-66E0-4378-AAB3-B2FECDDE61BB",
"vulnerable": true
},
{
"criteria": "cpe:2.3:a:redhat:ansible_automation_platform:2.0:*:*:*:*:*:*:*",
"matchCriteriaId": "7B4BE2D6-43C3-4065-A213-5DB1325DC78F",
"vulnerable": true
},
{
"criteria": "cpe:2.3:a:redhat:openshift_ai:-:*:*:*:*:*:*:*",
"matchCriteriaId": "EBF0A70A-E606-48C8-82C2-4D8760146265",
"vulnerable": true
},
{
"criteria": "cpe:2.3:a:redhat:openshift_lightspeed:-:*:*:*:*:*:*:*",
"matchCriteriaId": "C34B05C8-C19C-497F-8E1D-8F6039CDB185",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*",
"matchCriteriaId": "F4CFF558-3C47-480D-A2F0-BABF26042943",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*",
"matchCriteriaId": "7F6FB57C-2BC7-487C-96DD-132683AEB35D",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:*",
"matchCriteriaId": "D65C2163-CFC2-4ABB-8F4E-CB09CEBD006C",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
]