T09 · Insecure Skill Coding Practices
- Location
lib/googleSheets.js:207- Finding
Spreadsheet Formula Injection Through Untrusted Receipt Fields
- Content
View full analysis
[ expense.fingerprint, item.description, item.quantity || 1, item.amount, ]); await appendRows(spreadsheetId, BREAKDOWN_SHEET, itemRows); ``` ### Technical Analysis Receipt images and their OCR output are untrusted input. Fields such as `expense.vendor`, `expense.category`, and `item.description` originate from OCR and LLM processing, but neither stage constitutes an input-validation security boundary. The application writes these values using Google Sheets' `USER_ENTERED` mode. In this mode, strings beginning with formula indicators such as `=`, `+`, `-`, or `@` can be interpreted as spreadsheet expressions rather than literal text. No validation or formula neutralization is performed before the values reach `appendRow` or `appendRows`. An attacker can therefore place formula-like text in a submitted receipt and attempt to have it selected as the vendor or an item description. The resulting expression may manipulate displayed spreadsheet content, reference other ce ...[truncated 1752 chars]- Remediation
View remediation
