Skip to content

Conversation

@grich88
Copy link

@grich88 grich88 commented Oct 18, 2025

Fixes: #311

Security Fix: CORS Misconfiguration

Problem: The /api/v1/flags endpoint has a dangerous CORS configuration that allows requests from any origin (*) while also setting Access-Control-Allow-Credentials: true. This combination enables cross-origin attacks, credential theft, and data exfiltration.

Solution:

  • Replace wildcard origin (*) with specific domain validation
  • Allow only trusted AIxBlock domains
  • Maintain credentials support for legitimate requests
  • Prevent cross-origin attacks from malicious websites

Changes:

  • Updated CORS configuration in server.ts
  • Added origin validation function
  • Restricted to specific AIxBlock domains only
  • Maintained backward compatibility for legitimate requests

Security Impact: Prevents CSRF attacks, credential theft, and unauthorized cross-origin access while maintaining functionality for legitimate AIxBlock applications.

grich88 added 2 commits October 16, 2025 00:02
…endpoint

- Require authentication for accessing flags endpoint
- Require admin role for sensitive configuration access
- Filter sensitive data (AUTH0_DOMAIN, AUTH0_APP_CLIENT_ID, SAML_AUTH_ACS_URL, etc.)
- Prevent information disclosure vulnerability

Fixes: AIxBlock-2023#309
…ecific domain validation to prevent cross-origin attacks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MEDIUM: CORS Misconfiguration on workflow.aixblock.io

1 participant