WarUI

Formula injection protection on export and paste

GRID-A13-F23P1beyond-baselinePlanned

This feature protects users from formula-injection attacks, where untrusted text that starts with =, +, - or @ executes in desktop spreadsheets after a CSV or XLSX export. Options escape or neutralize such values, and paste from untrusted sources can be treated as text.

Planned. This page shows the specification from issue #192. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A grid where some text cells hold malicious-looking user input and other cells hold genuine formulas.

Expected behavior

With sanitizing enabled, risky text cells are prefixed with an apostrophe or escaped in the preview, while genuine formula cells export as intended. Disabling it shows a warning banner.

Planned API surface

option: exportCsv.sanitizeFormulasoption: exportXlsx.sanitizeTextCellsoption: formulas.trustedSourcesoption: formulas.pasteAsTextFromExternal

Acceptance criteria

  • Text-type cells whose values start with =, +, - or @ (or tab or carriage return) are neutralized when sanitizing is enabled. (pending)
  • Genuine formula cells are not altered unless the export mode is values. (pending)
  • Sanitizing is on by default for CSV. (pending)
  • The docs explain the risk and how the defaults handle it. (pending)