You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] CrossFilter short-circuits OPTIONS preflight with 200 OK even for disallowed origins, bypassing the filter chain #6720
Description:
The OPTIONS short-circuit if (request.getMethod() == HttpMethod.OPTIONS) { response.setStatusCode(HttpStatus.OK); return Mono.empty(); } is inside the if (CorsUtils.isCorsRequest(request)) block but outside the if (allowCors) block (which ends at line 115). So when the origin is not allowed (allowCors == false), no CORS headers are set, but OPTIONS still gets 200 OK + Mono.empty() — the filter chain is never called.
Impact:
OPTIONS preflight requests from disallowed origins bypass the entire filter chain (auth, logging, rate-limiting). The 200 OK is misleading. Security filters positioned after CrossFilter (@Order(-100)) are bypassed for all CORS OPTIONS requests.
Suggested fix:
Move the OPTIONS short-circuit inside the if (allowCors) block; for disallowed origins, pass through to chain.filter(exchange) or return 403.
Confidence: High
Related existing: SEC-16 covers allowedOrigins("*") in admin's WebConfiguration, not this OPTIONS bypass logic.
Activity
github-actions commentedon Aug 3, 2026
👋 Hello @yuluo-yx
A new issue has been opened by @Aias00:
Please review when you have time. Thank you! 🙏