{"id":"CVE-2016-10535","aliases":["EUVD-2019-0303","GHSA-hjhr-r3gq-qvp6"],"status":"published","title":"Timing Attack in csrf-lite","description":"csrf-lite is a cross-site request forgery protection library for framework-less node sites. csrf-lite uses `===`, a fail first string comparison, instead of a time constant string comparison This enables an attacker 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.","severity":{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-07","score":0.01281,"percentile":0.70224,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-208","CWE-310"],"published":"2018-05-31T20:00:00Z","modified":"2026-10-20T10:45:16Z","fixes":[{"ecosystem":"npm","package":"csrf-lite","fixed_in":["0.1.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"csrf-lite","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.2"}]}]},{"source":"osv","ecosystem":"npm","package":"csrf-lite","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.1.2"}]}]}],"products":[{"vendor":"csrf-lite_project","product":"csrf-lite"},{"vendor":"hackerone","product":"csrf-lite node module"}],"references":[{"url":"https://nodesecurity.io/advisories/94","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory"]},{"url":"https://github.com/isaacs/csrf-lite/pull/1","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2016-10535","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-hjhr-r3gq-qvp6","tags":["advisory"]},{"url":"https://www.npmjs.com/advisories/94","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2016-10535","description":"csrf-lite is a cross-site request forgery protection library for framework-less node sites. csrf-lite uses `===`, a fail first string comparison, instead of a time constant string comparison This enables an attacker 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.","status":"published","published":"2018-05-31T20:00:00Z","modified":"2024-09-17T01:30:58.704Z","cwes":["CWE-208"],"updated_at":"2026-11-02T14:33:31.117878Z"}],"euvd":[{"id":"EUVD-2019-0303","description":"csrf-lite is a cross-site request forgery protection library for framework-less node sites. csrf-lite uses `===`, a fail first string comparison, instead of a time constant string comparison This enables an attacker 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.","status":"published","published":"2018-05-31T20:00:00Z","modified":"2024-09-17T01:30:58Z","updated_at":"2026-11-03T00:28:49.329777Z"}],"ghsa":[{"id":"GHSA-hjhr-r3gq-qvp6","title":"Timing Attack in csrf-lite","description":"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.","status":"published","published":"2019-02-18T23:39:44Z","modified":"2023-01-09T05:03:03Z","cwes":["CWE-208"],"updated_at":"2026-11-02T14:36:04.396827Z"}],"nvd":[{"id":"CVE-2016-10535","description":"csrf-lite is a cross-site request forgery protection library for framework-less node sites. csrf-lite uses `===`, a fail first string comparison, instead of a time constant string comparison This enables an attacker 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.","status":"published","published":"2018-05-31T20:29:01.207Z","modified":"2026-06-17T00:39:53.673Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:P/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-208","CWE-310"],"updated_at":"2026-11-02T14:03:39.176887Z"}],"osv":[{"id":"CVE-2016-10535","description":"csrf-lite is a cross-site request forgery protection library for framework-less node sites. csrf-lite uses `===`, a fail first string comparison, instead of a time constant string comparison This enables an attacker 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.","status":"published","published":"2018-05-31T20:29:01.207Z","modified":"2026-10-20T10:45:16.667641273Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:01.531338Z"},{"id":"GHSA-hjhr-r3gq-qvp6","title":"Timing Attack in csrf-lite","description":"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.","status":"published","published":"2019-02-18T23:39:44Z","modified":"2023-11-08T03:58:11.147657Z","cwes":["CWE-208"],"updated_at":"2026-11-02T15:46:49.28217Z"}]}}
