Security vulnerabilities and automated fixes for llm security issues
3 posts found
A critical hardcoded API key (`actor-studio-gpt-beta`) was discovered in the `src/plugins/llm/index.js` file of the Actor Studio application, granting anyone with source code access the ability to make unauthorized requests to the LLM service endpoints. The fix removes the default key from both the LLM class definition and the settings module, requiring the key to be explicitly configured through module settings instead.
A critical prompt injection vulnerability in `src/llm.js` allowed user-supplied conversation turns to be forwarded directly to external AI APIs without any role validation or content sanitization. By injecting a malicious `role` value or crafted `text` payload, an attacker could manipulate the LLM's behavior, bypass instructions, or exfiltrate data. The fix introduces a `sanitizeTurns()` function that whitelists valid roles and coerces text content to safe string values before the payload reache
A missing batch size limit in `BatchModeRunner.jsx` allowed users to trigger unlimited LLM API calls by pasting thousands of items into the batch input field. This could exhaust shared API quotas in organizational settings where a single API key is distributed across multiple users. The fix introduces a hard cap of 25 items (`MAX_BATCH_SIZE = 25`) enforced directly in the `canRun()` validation function.