Csv injection

From zakirkun/ice-tea · View interactive version

Csv injection is an AI agent skill from the GitHub repository zakirkun/ice-tea. Detects user-controlled data written to CSV files without sanitization, enabling formula injection in spreadsheet applications.

How to use this skill

Skill file

CSV / Formula Injection

Overview

When user-controlled data is exported to CSV and a user opens it in Excel/LibreOffice, cells beginning with =, +, -, or @ are interpreted as formulas. Attackers can inject:

This affects any application that exports CSV without sanitizing cell values.

Remediation

Prefix dangerous characters with a single quote or tab, or wrap in double quotes:

def sanitize_csv(value):
    if str(value).startswith(('=', '+', '-', '@', '\t', '\r')):
        return "'" + str(value)
    return value
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.