CVE-2016-10535: Timing Attack in csrf-lite

csrf-lite Updated 02 Oct 2025

Summary

18/02/2019
Yes i
High
Not published

CVE-2016-10535: Timing Attack in csrf-lite. Affects csrf-lite versions < 0.1.2. Fixed in 0.1.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The csrf-lite package is an npm package that provides Cross-Site Request Forgery (CSRF) protection for web applications. It is designed to generate and validate CSRF tokens to prevent unauthorized requests. However, certain versions of csrf-lite are vulnerable to a timing attack.

Vulnerability Detail

The vulnerability in csrf-lite arises from the use of a fail-early comparison instead of a constant-time comparison when testing CSRF tokens. This allows an attacker to exploit timing differences and guess the secret token more efficiently. By providing per-character feedback on the correctness of a guess, an attacker can significantly reduce the number of guesses required to guess the secret token.

How To Fix

Latest published version: 1.0.0 as of 22 Oct 2026

npm install csrf-lite@1.0.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.1.2

This is the first release that contains the fix.

npm install csrf-lite@0.1.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability.

Conclusion

The csrf-lite package is vulnerable to a timing attack, which allows an attacker to guess the secret CSRF token more efficiently. To fix this vulnerability, it is recommended to update to version 0.1.2 or later. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for csrf-lite →

Share this vulnerability

FAQ

The vulnerability allows an attacker to guess the secret CSRF token more efficiently, potentially leading to unauthorized requests and security breaches.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and it will alert you in real-time if the vulnerability is present.

No, only versions prior to 0.1.2 are affected. It is recommended to update to version 0.1.2 or later to fix the vulnerability.

There is no known public exploit for this vulnerability at the moment.

How To Fix

Latest published version: 1.0.0 as of 22 Oct 2026

npm install csrf-lite@1.0.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.1.2

This is the first release that contains the fix.

npm install csrf-lite@0.1.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback