# CSV Formula Injection in Business Exports: Review Text Before a Spreadsheet Executes It

<a id="main-content"></a>

Operations &amp; Systems

October 28, 2026  ·  8 min read  ·  Victor Valentine Romo

On this page

1. [Name the Person and Program Receiving the File](<#name-the-person-and-program-receiving-the-file>)
2. [Build a Consumer Matrix Before Choosing a Prefix](<#build-a-consumer-matrix-before-choosing-a-prefix>)
3. [Compare Preservation With Consumer-Specific Mitigation](<#compare-preservation-with-consumer-specific-mitigation>)
4. [Preserve the Original Before Preparing a Review Copy](<#preserve-the-original-before-preparing-a-review-copy>)
5. [Walk Through a Fictional Supplier Export](<#walk-through-a-fictional-supplier-export>)
6. [Copy This Export Review Worksheet](<#copy-this-export-review-worksheet>)
7. [Review the Complete Handoff](<#review-the-complete-handoff>)
8. [Leave a Decision the Next Operator Can Repeat](<#leave-a-decision-the-next-operator-can-repeat>)
9. [Sources](<#sources>)

A customer writes `=1+2` in a reference field. The export carries those characters into a CSV. The recipient expects a reference.

The handoff needs a decision about interpretation before anyone opens the file in a [spreadsheet](</articles/spreadsheet-formula-audit-business/>).

[OWASP's CSV injection guidance](<https://community.owasp.org/attacks/CSV_Injection>) describes spreadsheet software interpreting formula-leading untrusted input as formulas. It flags equals, plus, minus, at signs, control characters, and some full-width variants. Delimiters and quotes also matter because a field boundary can change where a cell begins.

That boundary separates the source's stored text from the receiving application's behavior. An export coming from your own system can still contain text supplied by someone else.

The review method below uses invented supplier records and harmless arithmetic text. It proposes a handoff record. It does not report a security test or certify an exporter.

<a id="name-the-person-and-program-receiving-the-file"></a>

## Name the Person and Program Receiving the File

Start with the next use. “Export for operations” leaves too much unspecified.

Will a person read the file in a named spreadsheet application? Will another program import the fields as strings? Will someone edit a spreadsheet and send a new CSV onward?

Give each route its own acceptance rule. Ask the receiver which application, edition, version, [locale](</articles/decimal-thousands-separators-business-imports/>), and opening method they intend to use. Record unknown answers before choosing a transformation.

For a programmatic receiver, identify the parser and destination field rules. For a spreadsheet receiver, identify the import [procedure](</articles/sop-documentation-b2b/>) and the save-and-reopen path. Do not label an untested application compatible because its interface looks familiar.

Write the purpose beside the [filename](</articles/file-delivery-manifest-business-handoffs/>). A human review copy and an integration input should have different identities when their value rules differ.

Keep the [CSV data contract](</articles/csv-data-contract-business-handoffs/>) nearby. That contract defines what each field means. This review asks whether untrusted text crosses into spreadsheet interpretation during the agreed handoff.

The receiving person owns the use decision. The exporter owner owns the transformation description. Both need the same sample and the same expected result.

<a id="build-a-consumer-matrix-before-choosing-a-prefix"></a>

## Build a Consumer Matrix Before Choosing a Prefix

Use a matrix to make competing requirements visible. These rows are proposed planning categories, not product compatibility claims.

| Consumer | Intended treatment | Proposed acceptance evidence | Hold condition |
| --- | --- | --- | --- |
| Human spreadsheet review | Untrusted reference text remains text | Exact value and cell treatment checked in the named application | Application or opening route unknown |
| Programmatic import | Agreed original strings reach the receiver | Parsed fields compared with the contract | Undocumented value changes |
| Spreadsheet editing followed by CSV export | Treatment survives the complete agreed handoff | Initial import, saved export, and reopened result reviewed | Only the first opening was checked |
| Mixed or unknown destination | Requirements remain unresolved | Separate consumer decisions obtained | One file is being described as universally safe |

Do not resolve the mixed row by selecting the most convenient format for the sender. Ask which destination matters. Split the [deliverables](</articles/consulting-deliverable-acceptance-criteria/>) when the requirements cannot share one representation.

Give the raw integration file a clear handling boundary. Preservation means keeping the agreed source strings. It does not establish that the file is suitable for casual spreadsheet opening.

Likewise, a transformed review copy needs a description of every intended change. A recipient should not mistake a viewing adjustment for a correction to the business record.

If the team cannot identify a receiving route, hold distribution under this proposed method. A filename containing the word safe does not answer the missing question.

<a id="compare-preservation-with-consumer-specific-mitigation"></a>

## Compare Preservation With Consumer-Specific Mitigation

[OWASP](<https://community.owasp.org/attacks/CSV_Injection>) warns that Excel save-and-reopen behavior can defeat quote and apostrophe escaping. Its Excel-focused tab-prefix approach changes underlying data and may differ elsewhere. It explicitly rejects a universal sanitization strategy across consumers.

Use those limits to frame a local choice. Treat CSV structural quoting and spreadsheet interpretation as separate review questions. A file can preserve its field boundaries while leaving the consumer decision unresolved.

Choose among three proposed outcomes: preserve for a controlled programmatic import, produce a separately labeled consumer-specific viewing copy, or hold the export.

Do not strip leading characters silently. A reference beginning with a minus sign might be legitimate text. Removing the character would change the record while hiding the reason for the edit.

Do not apply a blanket cleanup rule to every column without an owner accepting its consequences. A quantity column and a free-text note have different meanings. Define which columns accept untrusted text and which have independently enforced [business rules](</articles/business-decision-table-gaps-overlaps/>).

Record the mitigation as a named transformation with a version. State its target consumer, expected value changes, and required checks. Avoid a bare instruction to escape the data.

For a prefix-based candidate, inspect the parsed field value as well as the displayed cell. If the prefix remains part of the value, the review record must say so. Preservation and visual readability need separate results.

<a id="preserve-the-original-before-preparing-a-review-copy"></a>

## Preserve the Original Before Preparing a Review Copy

Keep an untouched source export under [the team's existing access rules](</articles/small-team-access-review-evidence/>). Give the working copy a separate filename and review identifier.

Record the source system, export time, included columns, row scope, and [source file fingerprint](</articles/checksum-verification-business-file-handoffs/>) when available. Keep the record free of copied private notes. A column name and value class often explain a finding without reproducing the sensitive value.

For this proposed workflow, transformations occur only on a derivative. Keep the original field string available to authorized reviewers so they can explain each difference.

Distinguish an intentional transformation from accidental damage. Prefixing a field under an accepted consumer rule is deliberate. Losing its trailing characters is a separate defect. A single changed-value count cannot tell those cases apart.

Use a protected comparison record when business values are involved. The public example below contains synthetic values only. It needs no production export, customer account, or live integration.

If the original export is unavailable, mark preservation evidence missing. A previously edited spreadsheet cannot establish [what the source originally supplied](</articles/data-lineage-small-business-reports/>).

<a id="walk-through-a-fictional-supplier-export"></a>

## Walk Through a Fictional Supplier Export

Imagine an operations coordinator preparing a supplier reference list for two destinations. One colleague wants a spreadsheet review copy. A receiving program needs the original reference strings.

The invented dataset contains four records. The `supplier_id` values are `S-101`, `S-102`, `S-103`, and `S-104`. Their reference fields are `Dock A`, `=1+2`, `-WEST`, and `Bay, East`.

`=1+2` is deliberately harmless. Its arithmetic result would be three, but the required reference value is the four-character string. The acceptance target is preservation as text for the selected use.

`-WEST` is an invented literal reference, not a calculation. `Bay, East` exercises the field-boundary review. Treat these as distinct review cases rather than four examples of the same problem.

The coordinator labels the first derivative “supplier review copy, candidate one.” Its consumer details remain blank until the colleague identifies the application and opening route. No outcome is recorded as passed yet.

The integration derivative keeps the original strings under its agreed contract. Its receiving check compares all four identifiers with their corresponding reference values. A changed prefix would be a mismatch unless that contract explicitly allowed it.

Neither derivative inherits approval from the other. The team can accept the programmatic handoff while holding the spreadsheet copy. The status belongs to the file and consumer combination.

<a id="copy-this-export-review-worksheet"></a>

## Copy This Export Review Worksheet

Put a short heading above the worksheet: source identity, derivative identity, transformation version, consumer configuration, reviewer, and review date.

The entries below define required checks for the fictional export. Every result remains pending until the named receiving route is tested.

| Column | Original value class | Intended consumer | Transformation | Required validation evidence |
| --- | --- | --- | --- | --- |
| `supplier_id` | Controlled identifier text | Both named destinations | Preserve | Pending exact-identifier and row-association comparison |
| `reference` | Ordinary text: `Dock A` | Spreadsheet review | Candidate rule recorded separately | Pending exact-value and treatment check |
| `reference` | Formula-leading text: `=1+2` | Spreadsheet review | Consumer-specific candidate, if accepted | Pending import, save, reopen, and field comparison |
| `reference` | Sign-leading literal: `-WEST` | Spreadsheet review | Candidate must document any changed characters | Pending literal-value comparison |
| `reference` | Text containing a comma: `Bay, East` | Both destinations | Structural quoting under the file contract | Pending single-field and `S-104` association check |
| `reference` | All four original strings | Programmatic import | Preserve under the receiving contract | Pending comparison of all four parsed fields with the untouched source |

Add observed output and disposition columns when performing the exercise. Keep the targets intact. Replacing a required value with the actual output would erase the discrepancy you meant to investigate.

Record the evidence location for every completed check. A [workbook](</articles/excel-date-systems-business-handoffs/>) filename alone is weak evidence if several versions share that name. Use a stable file identity and identify the sheet or import run.

For larger files, define how the full export will be validated separately from the small acceptance sample. Four synthetic records demonstrate four selected cases. They do not establish coverage of every future input.

<a id="review-the-complete-handoff"></a>

## Review the Complete Handoff

Test the path the recipient intends to follow. Include each agreed opening, editing, saving, and reopening step in the review scope.

For a spreadsheet candidate, inspect the resulting cell treatment and the original-string comparison. Record whether each checked value is being handled as literal text. Keep a failed or unknown result visible.

Inspect the saved derivative through a text-preserving reader. Compare parsed fields with the expected transformed values. Then review the agreed receiving route again. A screenshot of the first open file does not cover the later exported file.

Reconcile record count and identity. This fictional dataset requires four records and four distinct supplier identifiers. The references must remain beside the correct identifiers. Equal totals alone would miss a swapped association.

Keep the [identifier import procedure](</articles/excel-preserve-identifiers-csv-import/>) as a separate check when using Excel. Preserving a product code and handling untrusted reference text are different acceptance questions.

Stop when an observed value differs without an accepted explanation. Return to the unchanged source and the transformation record. Do not patch a few visible cells and describe the export rule as repaired.

Track exceptions by record identifier, column, value class, failed check, and assigned owner. Keep the original value in the controlled evidence location. The shared issue list can describe the class without reproducing private text.

[Separate detection from intent](</articles/incident-postmortem-small-service-team/>). A formula-leading reference needs a handling decision regardless of why someone entered it. The review record should describe the observed string and receiving behavior. It should not accuse its author of an attack without evidence. Resolve the export boundary before investigating a separate conduct question.

<a id="leave-a-decision-the-next-operator-can-repeat"></a>

## Leave a Decision the Next Operator Can Repeat

Close the review with the accepted file identity, permitted consumer, transformation version, checked path, evidence, and unresolved limits.

Name who can approve a changed consumer. Sending the viewing copy to a programmatic receiver is a new handoff with new requirements. Record that decision before [repurposing](</articles/content-repurposing-b2b/>) the file.

Use repeated findings to improve the exporter specification. Keep them distinct from general [CRM data quality work](</articles/crm-data-quality-automation/>). A trustworthy business value still needs a defined export boundary.

Keep the record honest when work is incomplete. “Spreadsheet review pending” gives the next operator a task. “Sanitized” without a consumer or evidence gives them an assumption.

The receiver determines the check.

<a id="sources"></a>

## Sources

- [OWASP Foundation: CSV Injection](<https://community.owasp.org/attacks/CSV_Injection>). Interpretation risks, mitigation limits, and consumer-specific trade-offs. Checked 2026.10.28.
