metabase / metabase/metabase

CSV escaping option

Open
#17,335 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.Security related Reporting/Export Type:New Feature
Dominant language
Clojure
Stars
49.3k
Forks
6.8k
Avg merge
1d 13h
Merged PRs (30d)
653

Description

CSV exports are currently unescaped, meaning that formulas can be stuck on them and Excel and Google Sheets interprets them on load as formulas qua formulas. This is bad because of the possibility of formula injection, which can get bad with social engineering to get end user to click ignore on warnings (or they ignore warnings anyways). This is hard to exploit which is why the ticket is public.

So presumably some people use the CSV export as input to some automated process so it needs to be an option, but default on the option should probably be escaping.

XLSX exports are escaped already.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the CSV export implementation and compare its behavior with the existing XLSX export, which the issue says is already escaped. Determine where an export option can be exposed and how its default should be applied; done means formula-injection values are escaped by default while callers can opt out for automated CSV consumers.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
data, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.