T09 · Insecure Skill Coding Practices
- Location
auto-capture.js:73- Finding
Remote Command Injection Through Attacker-Controlled Email Sender Data
- Content
View full analysis
/, '').trim() || ''; const okkiMatch = await searchOkkiCustomer(email, companyName); ``` ### Technical Analysis `execSync()` receives a command string that is interpreted by a shell. Both `domain` and `companyName` originate from an untrusted email `From` header and are interpolated directly inside double quotes. Double quotes do not neutralize shell command substitution, and an attacker can also inject a closing quote followed by shell operators. The filename of the vector-search script is configurable, but neither that path nor the untrusted query is passed as a discrete process argument. Because automatic capture can process remotely supplied messages, this flaw creates a remote-to- ...[truncated 1166 chars]- Remediation
View remediation
?` expression. - Apply strict length and character limits to search terms. - Run automatic mail processing in a sandbox with no access to unrelated secrets or files. - Add regression tests containing quotes, semicolons, command substitutions, newlines, and shell operators. ]]>
