|
| 1 | +--- |
| 2 | +"@csrf-armor/core": patch |
| 3 | +"@csrf-armor/express": patch |
| 4 | +"@csrf-armor/nextjs": patch |
| 5 | +--- |
| 6 | + |
| 7 | +## SECURITY FIXES: Critical timing attack vulnerabilities and dependency updates |
| 8 | + |
| 9 | +This release addresses critical security vulnerabilities and updates all vulnerable dependencies. |
| 10 | + |
| 11 | +## Critical Security Fixes |
| 12 | + |
| 13 | +### Timing Attack Vulnerabilities (CRITICAL) |
| 14 | +Fixed three timing attack vulnerabilities in CSRF token validation that could allow attackers to reconstruct valid tokens through timing analysis: |
| 15 | + |
| 16 | +- **validateDoubleSubmit** (validation.ts:104): Replaced non-constant-time string comparison with `timingSafeEqual()` |
| 17 | +- **validateSignedDoubleSubmit cookie check** (validation.ts:142): Fixed cookie integrity comparison to use constant-time equality |
| 18 | +- **validateSignedDoubleSubmit token matching** (validation.ts:147): Fixed token comparison to prevent timing side-channel attacks |
| 19 | + |
| 20 | +These vulnerabilities could have allowed attackers to bypass CSRF protection entirely by analyzing response timing patterns. All token comparisons now use cryptographically constant-time operations. |
| 21 | + |
| 22 | +### Weak Secret Generation (HIGH) |
| 23 | +Fixed default secret generation (constants.ts:146) that produced weak comma-separated decimal strings instead of proper base64-encoded secrets. Now uses `generateSecureSecret()` for high-entropy, properly-encoded secrets. |
| 24 | + |
| 25 | +## Dependency Security Updates |
| 26 | + |
| 27 | +All vulnerable dependencies have been updated to patched versions: |
| 28 | + |
| 29 | +- **qs** (CVE-2025-15284): Updated to >=6.14.1 via pnpm override - fixes DoS vulnerability via memory exhaustion |
| 30 | +- **diff** (CVE-2026-24001): Updated to 8.0.3 via tsdown 0.20.1 - fixes denial of service vulnerability |
| 31 | +- **js-yaml**: Updated via @changesets/cli 2.29.8 - resolves YAML parsing vulnerabilities |
| 32 | +- **next** (npm advisories: 1112593, 1112638, 1112649): Updated to 16.1.6 - fixes multiple security vulnerabilities including CVE-2025-59471, CVE-2025-59472, and CVE-2026-23864 |
| 33 | + |
| 34 | +## Other Updates |
| 35 | + |
| 36 | +- Updated `@biomejs/biome` to 2.3.13 |
| 37 | +- Updated `@types/node` to 20.0.0 (fixes peer dependency warnings) |
| 38 | +- Updated vitest and related packages to 4.0.18 |
| 39 | +- Updated typescript to 5.9.3 |
| 40 | +- Updated jsdom to 27.4.0 |
| 41 | +- Updated package exports to match new tsdown output format (.mjs files) |
| 42 | + |
| 43 | +## Security Impact |
| 44 | + |
| 45 | +- ✅ Zero critical vulnerabilities remaining |
| 46 | +- ✅ Zero high-severity vulnerabilities remaining |
| 47 | +- ✅ No remaining known CVEs after upgrade (verified via pnpm audit) |
| 48 | +- ✅ All 66 tests passing across all packages |
| 49 | + |
| 50 | +**Upgrade Priority: CRITICAL** - All users should upgrade immediately to address timing attack vulnerabilities. |
0 commit comments