T05 · Unauthorized Access and Privilege Escalation
- Location
src/server.ts:286- Finding
Unauthenticated privileged API endpoints are exposed on all network interfaces
- Content
View full analysis
{ const clientConfig: ClientConfig = getClientConfig(config); res.json(clientConfig); }); app.post('/api/speaking-done', async (_req: Request, res: Response) => { await setSpeaking(false); res.json({ ok: true }); }); app.post('/api/chat', async (req: Request, res: Response) => { const { message, lang } = req.body; // ... const response = await sendChat(augmented); // ... res.json({ spoken, detail }); }); app.post('/api/send-slack', async (req: Request, res: Response) => { const { text } = req.body; // ... const response = await sendChat( `[SYSTEM] Send the following message via Slack DM to targets: ${targetStr}. Do NOT modify the content, just send it as-is. Reply with just "Sent!" after.\n\n${text}` ); res.json({ ok: true, response }); }); app.post('/api/tts', async (req: Request, res: Response) => { const { text, lang, voiceId: customVoiceId } = req.body; // ... const ttsRes = await fetch( `https://api.elevenlabs.io/v1/text-to-speech/${voiceId}?output_format=pcm_16000`, { method: 'POST', headers: { 'xi-api-key': config.secrets.elevenLabsApiKey, 'Content-Type': 'application/json', }, body: JSON.stringify(ttsBody), } ); // ... }); app.post('/api/send-email', async (req: Request, res: Response) => { const { text } = req.body; // ... const response = await sendChat( `[SYSTEM] Send the following content to ${config.integrations.email.recipient} as an email from ${config.app.name}. Use a suitable subject line based on the content. Do NOT modify the content. Reply with just "Sent!" after ...[truncated 2322 chars]- Remediation
View remediation
