The TTS generation endpoint sets Access-Control-Allow-Origin: * as a hardcoded response header, independent of the server's CORS configuration. This enables any webpage to make cross-origin requests to generate speech using stored credentials.
// packages/server/src/controllers/text-to-speech/index.ts:83
res.setHeader('Access-Control-Allow-Origin', '*')
res.setHeader('Access-Control-Allow-Headers', 'Cache-Control')
getCorsOptions()) which is otherwise restrictive by defaultRemove the hardcoded CORS wildcard and let the server's CORS middleware handle the headers:
// Remove these lines:
// res.setHeader('Access-Control-Allow-Origin', '*')
// res.setHeader('Access-Control-Allow-Headers', 'Cache-Control')
packages/server/src/controllers/text-to-speech/index.ts line 83{
"github_reviewed": true,
"severity": "MODERATE",
"cwe_ids": [
"CWE-942"
],
"nvd_published_at": null,
"github_reviewed_at": "2026-05-20T15:38:02Z"
}