GHSA-hjhr-r3gq-qvp6

Suggest an improvement
Source
https://github.com/advisories/GHSA-hjhr-r3gq-qvp6
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2019/02/GHSA-hjhr-r3gq-qvp6/GHSA-hjhr-r3gq-qvp6.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-hjhr-r3gq-qvp6
Aliases
Published
2019-02-18T23:39:44Z
Modified
2023-11-08T03:58:11Z
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.

Timing 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.

Under 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.

Recommendation

Update to version 0.1.2 or later.

Database specific
{
    "cwe_ids":  [
        "CWE-208"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2020-06-16T21:40:36Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

npm / csrf-lite

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.1.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2019/02/GHSA-hjhr-r3gq-qvp6/GHSA-hjhr-r3gq-qvp6.json"