Vulnerability Description
A critical CORS misconfiguration exists in backend/app/main.py where allow_origins=["*"] is used alongside allow_credentials=True.
Impact
According to the CORS specification (RFC 6454), when Access-Control-Allow-Credentials: true is set, the Access-Control-Allow-Origin header must specify an explicit origin, not a wildcard. The current configuration allows any external website to make authenticated cross-origin requests to the API.
This means:
- An attacker can host a malicious website
- When a logged-in InterXAI user visits that site, the attacker's JavaScript can make API calls with the user's credentials (JWT token from Authorization header or cookies)
- The browser will include credentials because
allow_credentials=True
- The attacker can read, modify, or delete user data
Location
backend/app/main.py:46-51
CVSS Score
8.8 (High) - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Fix
The fix restricts allowed origins to specific development URLs and makes them configurable via Settings.CORS_ORIGINS.
Vulnerability Description
A critical CORS misconfiguration exists in
backend/app/main.pywhereallow_origins=["*"]is used alongsideallow_credentials=True.Impact
According to the CORS specification (RFC 6454), when
Access-Control-Allow-Credentials: trueis set, theAccess-Control-Allow-Originheader must specify an explicit origin, not a wildcard. The current configuration allows any external website to make authenticated cross-origin requests to the API.This means:
allow_credentials=TrueLocation
backend/app/main.py:46-51CVSS Score
8.8 (High) - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Fix
The fix restricts allowed origins to specific development URLs and makes them configurable via
Settings.CORS_ORIGINS.