CVE-2023-26136: Tough cookie Tough-cookie Prototype Pollution Vulnerability Vulnerability
MODERATECVE-2023-26136 is a MODERATE (CVSS 6.5) tough-cookie prototype pollution vulnerability vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Tough cookie libraries in the npm ecosystem. The issue involves tough-cookie prototype pollution vulnerability. Remediation is available by upgrading affected packages to version 4.1.3.
CVE-2023-26136 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2023-26136
To remediate this vulnerability, upgrade all affected Tough cookie dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install tough-cookie@4.1.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls tough-cookie
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-26136, inspect your project dependencies using npm:
npm ls tough-cookie
Analyze the terminal output to locate any version of Tough cookie in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.3), your application is affected.
Note: The npm ls tough-cookie command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Tough cookie, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-26136 Affected Tough cookie Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tough-cookie
|
npm |
< 4.1.3
|
4.1.3
|
References
Frequently Asked Questions
What is CVE-2023-26136?
Which Tough cookie versions are affected?
What version fixes CVE-2023-26136?
Is tough-cookie affected?
What is the CVSS score of CVE-2023-26136?
What CWE is associated with CVE-2023-26136?
How can I check npm dependencies for CVE-2023-26136?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-72xf-g2v4-qvf3",
"modified" : "2024-06-21T21:33:53Z",
"published" : "2023-07-01T06:30:16Z",
"aliases" : [ "CVE-2023-26136" ],
"summary" : "tough-cookie Prototype Pollution vulnerability",
"details" : "Versions of the package tough-cookie before 4.1.3 are vulnerable to Prototype Pollution due to improper handling of Cookies when using CookieJar in `rejectPublicSuffixes=false` mode. This issue arises from the manner in which the objects are initialized.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "tough-cookie"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.1.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-26136"
}, {
"type" : "WEB",
"url" : "https://github.com/salesforce/tough-cookie/issues/282"
}, {
"type" : "WEB",
"url" : "https://github.com/salesforce/tough-cookie/commit/12d474791bb856004e858fdb1c47b7608d09cf6e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/salesforce/tough-cookie"
}, {
"type" : "WEB",
"url" : "https://github.com/salesforce/tough-cookie/releases/tag/v4.1.3"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/07/msg00010.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3HUE6ZR5SL73KHL7XUPAOEL6SB7HUDT2"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6PVVPNSAGSDS63HQ74PJ7MZ3MU5IYNVZ"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20240621-0006"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-TOUGHCOOKIE-5672873"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-07T21:39:57Z",
"nvd_published_at" : "2023-07-01T05:15:16Z"
}
}