Skip to content

[Security] CSV/Excel exports lack formula-injection neutralization #66

Description

@Exotic209093

Severity

Medium — classic CSV-injection: org data authored by other Salesforce users executes in the admin's Excel.

What happens

escapeCsvValue only quotes for "", ',', \n, \r; the Excel path passes strings to SheetJS untouched. A text field containing =HYPERLINK("http://evil","click") or =cmd|' /C calc'!A0 is written verbatim and executes as a formula when the export opens in Excel. Verified live against the packaged 0.6.0 bundle: a record named =SUM(A1:A9) exports verbatim into CSV. Also applies to the Bulk upload CSV builder.

Evidence

  • src/ui/utils/csv.ts:9-16
  • src/ui/utils/excel.ts (raw json_to_sheet)
  • src/services/salesforce/bulk-api.ts:274

Suggested fix

Prefix cells matching /^[=+\-@\t\r]/ with ' (optionally behind a toggle, as some tools offer). Add tests.

Environment

Commit 74cf21b (main), WaveLink 0.6.0. Found in the 2026-08-31 adversarial audit (code + live harness verified).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsecuritySecurity or privacy risk

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions