Skip to content

Security: timing attack in auth token comparison (CWE-208) #306

@spidershield-contrib

Description

@spidershield-contrib

Summary

The authentication token comparison uses === which is vulnerable to timing attacks (CWE-208).

Details

  • CWE: CWE-208 (Observable Timing Discrepancy)
  • Severity: Medium
  • File: config.server.ts
  • Impact: An attacker can determine the secret value character-by-character by measuring response time differences.

Suggested Fix

Use constant-time comparison: crypto.timingSafeEqual() (Node.js).


Found by SpiderShield security scanner

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions