Skip to content

πŸ›‘οΈ Sentinel: [HIGH] Fix CSV formula injection null byte bypass - #1014

Closed
seonghobae wants to merge 1 commit into
developfrom
sentinel/csv-injection-bypass-9564197493898694460
Closed

πŸ›‘οΈ Sentinel: [HIGH] Fix CSV formula injection null byte bypass#1014
seonghobae wants to merge 1 commit into
developfrom
sentinel/csv-injection-bypass-9564197493898694460

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

🚨 Severity: HIGH
πŸ’‘ Vulnerability: CSV Formula Injection can be bypassed using a null byte (\x00).
🎯 Impact: Attackers can execute arbitrary commands on a user's machine if the user opens the exported CSV file in spreadsheet software like Excel that ignores the null byte.
πŸ”§ Fix: Added the null byte (\x00) to the regex used for escaping CSV formula trigger characters.
βœ… Verification: Ran npm run test --workspace @bandscope/desktop to verify the added test cases passed and ./scripts/harness/quickcheck.sh to ensure all checks passed.


PR created automatically by Jules for task 9564197493898694460 started by @seonghobae


Open in Devin Review

@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 Aug 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 6 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

βš™οΈ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ccb01df-0988-40be-bbf7-30c94c1d338b

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between acdbea6 and fcffcf4.

β›” Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
πŸ“’ Files selected for processing (3)
  • .jules/sentinel.md
  • apps/desktop/src/lib/export.test.ts
  • apps/desktop/src/lib/export.ts

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.

Copy link
Copy Markdown
Collaborator Author

Closing this as a competing/superseded CSV-security writer lane after fresh exact comparison.

No code is transferred from this branch because the security behavior is already strictly subsumed by #941. Dependency-security and lockfile authority remain #783-owned; no suppression or generated-lock rewrite belongs in this leaf lane.

@seonghobae seonghobae closed this Aug 24, 2026
@google-labs-jules

Copy link
Copy Markdown

Closing this as a competing/superseded CSV-security writer lane after fresh exact comparison.

No code is transferred from this branch because the security behavior is already strictly subsumed by #941. Dependency-security and lockfile authority remain #783-owned; no suppression or generated-lock rewrite belongs in this leaf lane.

Understood. Acknowledging that this work is superseded by #941 and the PR is closed. Stopping work on this task.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Open in Devin Review

// Prevent CSV formula injection by prefixing problematic leading characters with a single quote
if (/^[\s\uFEFF\xA0]*[=+\-@\t\r\n]/.test(value)) {
// eslint-disable-next-line no-control-regex
if (/^[\s\uFEFF\xA0]*[=+\-@\t\r\n\x00]/.test(value)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟑 Incomplete export Security Notes

Export changes require Security Notes covering boundaries, validation, safe failure, logging/privacy, and tests. The existing note omits several required review points.

Prompt for agents
The change touches CSV export behavior in apps/desktop/src/lib/export.ts. AGENTS.md and docs/security/app-security.md require Security Notes for export changes that cover untrusted inputs, trust boundaries, validation or allowlists, safe failure, logging/privacy impact, and test points. Add that evidence in the PR implementation summary or update the relevant implementation documentation before merge.
Open in Devin Review

Was this helpful? React with πŸ‘ or πŸ‘Ž to provide feedback.

// Prevent CSV formula injection by prefixing problematic leading characters with a single quote
if (/^[\s\uFEFF\xA0]*[=+\-@\t\r\n]/.test(value)) {
// eslint-disable-next-line no-control-regex
if (/^[\s\uFEFF\xA0]*[=+\-@\t\r\n\x00]/.test(value)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ“ Info: Only leading null bytes are neutralized

The regex /^[\s\uFEFF\xA0]*[=+\-@\t\r\n\x00]/ flags a null byte only at the field start. A payload like x\x00=cmd, where the null byte separates benign text from the trigger, is not prefixed. Consistent with the prior leading-trigger model, but interior null bytes remain unhandled.

Open in Devin Review

Was this helpful? React with πŸ‘ or πŸ‘Ž to provide feedback.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant