Skip to content

fix(export): contain spreadsheet formula interpretation in session CSV - #596

Draft
seonghobae wants to merge 10 commits into
developmentalfrom
security-fix-csv-injection-3896379793756400351
Draft

fix(export): contain spreadsheet formula interpretation in session CSV#596
seonghobae wants to merge 10 commits into
developmentalfrom
security-fix-csv-injection-3896379793756400351

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 7, 2026

Copy link
Copy Markdown

Finding

The sessions CSV exporter quoted delimiters/quotes but did not treat spreadsheet formula interpretation as a separate output-boundary concern. Attacker-controlled session/project text beginning with formula-triggering characters could therefore become a formula when an authorized user opens the export in spreadsheet software.

The prior HIGH/RCE wording was broader than the current evidence. Practical impact depends on the spreadsheet application and user interaction. OWASP documents formula execution/data-exfiltration risks, but also notes that common quote/apostrophe mitigations are not universally reliable after Microsoft Excel save/re-open.

Repair

Current exact head: 1324e1ed2771ab10dfc87ac34833cdb4b6220581
Protected target at repair start: developmental@2fa92012bcf80acc1f921a4bafea76b3b1424b46.

Effective product delta is intentionally scoped to:

  • packages/web/src/lib/server/csv.ts: pure, documented CSV field serialization boundary with an explicit string return contract;
  • packages/web/src/lib/server/csv.test.ts: individually attributable formula-trigger, Unicode/control, delimiter/quote, leading-space and numeric-semantics regressions, aligned with the repository test strategy;
  • sessions export route: consumes the shared serializer;
  • docs/product-technical-gap-baseline.md: records the code-current boundary, evidence and spreadsheet-application acceptance gap.

Normal repair descendants restored .jules/sentinel.md, root package.json and pnpm-lock.yaml to protected-base authority, removing unrelated dependency overrides and generated doctrine from this security lane.

Acceptance

Keep Draft until the unchanged exact head has terminal-success type/lint/test/security/SAST/CodeQL evidence and current review/thread evidence. Unit tests establish deterministic serializer behavior, not universal spreadsheet safety. Before claiming the buyer-visible gap closed, validate benign payloads in the supported spreadsheet target(s), including Excel save/re-open if Excel is supported, and inspect the raw CSV to prove delimiter/quote inputs cannot create a second cell.

Reference: OWASP CSV Injection — https://owasp.org/www-community/attacks/CSV_Injection

Do not reintroduce unrelated dependency churn, source-neutral retriggers, self-approval, synthetic status, or gate weakening.

@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as draft September 7, 2026 22:09
@seonghobae seonghobae changed the title 🛡️ Sentinel: [HIGH] Fix CSV Formula Injection vulnerability fix(export): contain spreadsheet formula interpretation in session CSV Sep 7, 2026
@seonghobae seonghobae added bug Something isn't working priority: high High-priority or P1 work labels Sep 8, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: high High-priority or P1 work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant