Vercel Functions (Edge / Node) · CWE-601
Vercel Functions: Open Redirect & OAuth Code Leak (Code Remediation)
Implement fail-closed guards and safe data filters. Prevent login or OAuth returnTo parameters from redirecting users or tokens off-origin. Tailored for Vercel Functions: Set strict middleware boundaries plus secondary handler checks and tight CSP headers.
Coverage ledger tracking key
surface:vercel-edge::boundary:open-redirect-oauth::angle:remediation
ZAP 20019 External Redirect probe
Risk boundary
// Unverified Vercel Functions path (CWE-601 · Code Remediation)
// Handler accepts input without validating verified session.Hardened guard
// Hardened Vercel Functions (CWE-601 · Code Remediation)
// 1. Set strict middleware boundaries plus secondary handler checks and tight CSP headers
// 2. Validate redirect targets against strict relative paths or exact allowlisted redirect URIs.Verification steps
- 01Seed coverage-ledger.json for every Vercel Functions handler touching Open Redirect & OAuth Code Leak.
- 02Trace request parameters through verified session validation down to the sink.
- 03Verify with paired positive/negative evidence via zap-automation-auth.