Vulnerabilities in pkg:npm/csrf-lite
PACKAGECVE-2016-10535 is a HIGH timing attack vulnerability (CWE-208: Observable Timing Discrepancy) affecting Csrf lite libraries in the npm ecosystem. The issue involves timing attack in csrf-lite. Remediation is available by upgrading affected packages to version 0.1.2.
pkg:npm/csrf-lite
Vulnerability advisories affecting package pkg:npm/csrf-lite. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-hjhr-r3gq-qvp6 | CVE-2016-10535 | HIGH | Timing Attack in csrf-lite |
CVE-2016-10535 at a Glance
How to Fix CVE-2016-10535
To remediate this vulnerability, upgrade all affected Csrf lite 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 csrf-lite@0.1.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls csrf-lite
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2016-10535, inspect your project dependencies using npm:
npm ls csrf-lite
Analyze the terminal output to locate any version of Csrf lite in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.2), your application is affected.
Note: The npm ls csrf-lite 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-208: Observable Timing Discrepancy, where two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not. In Csrf lite, 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-2016-10535 Affected Csrf lite Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
csrf-lite
|
npm |
< 0.1.2
|
0.1.2
|
References
Frequently Asked Questions
What is CVE-2016-10535?
Which Csrf lite versions are affected?
What version fixes CVE-2016-10535?
Is csrf-lite affected?
What CWE is associated with CVE-2016-10535?
How can I check npm dependencies for CVE-2016-10535?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hjhr-r3gq-qvp6",
"modified" : "2020-08-31T18:10:37Z",
"published" : "2019-02-18T23:39:44Z",
"aliases" : [ "CVE-2016-10535" ],
"summary" : "Timing Attack in csrf-lite",
"details" : "Affected versions of `csrf-lite` are vulnerable to timing attacks as a result of testing CSRF tokens via a fail-early comparison instead of a constant-time comparison. \n\nTiming attacks remove the exponential increase in entropy gained from increased secret length, by providing per-character feedback on the correctness of a guess via miniscule timing differences.\n\nUnder favorable network conditions, an attacker can exploit this to guess the secret in no more than (16*18)288 guesses, instead of the 16^18 guesses required were the timing attack not present. \n\n\n## Recommendation\n\nUpdate to version 0.1.2 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "csrf-lite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-10535"
}, {
"type" : "WEB",
"url" : "https://github.com/isaacs/csrf-lite/pull/1"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-hjhr-r3gq-qvp6"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/94"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-208" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:40:36Z",
"nvd_published_at" : null
}
}