Skip to content
RCE Disclosed report Intermediate

Export vault feature is vulnerable to CSV injection

The vault export writes user-controlled values into a CSV without escaping leading formula characters, so a crafted entry may be interpreted as a spreadsheet formula when opened, potentially with significant impact.

kenziy Follow

Originally disclosed on HackerOne

  • Disclosed after 29 hours

Hello guys

I don't know if you care about this issue but it seems that the export feature in your https://vault.bitwarden.com/#/tools is vulnerable to CSV injection. If a CSV contains a malicious command it may have big impact

Even though there is a popup notification for users before opening the CSV but due to it is coming from bitwarden site. User might trust the CSV.

I provide a video demo to show how the issue was found https://www.youtube.com/watch?v=Y8zmUZu9z4c

Attack

If the data inside the CSV if from other users then this might be a big impact. attackers will insert malicious command.

Im using this excel command @SUM(1+1)*cmd|' /C calc'!A0

Fix

Prefix =, +, - and @ symbols with a ' in issues when exporting them to a .csv file might do the tricks.

Referrence

https://hackerone.com/reports/111192 https://hackerone.com/reports/216243

Cheers Kenziy

The original report as published on HackerOne, by kenziy. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the export routine wrote user-supplied values into the CSV verbatim without prefixing formula-triggering characters such as =, +, - and @.

What the attacker needed

Attacker-controlled data in the vault; victim exports the vault to CSV; victim opens the CSV in a spreadsheet

The fix

The export should prefix leading =, +, - and @ characters with an apostrophe so spreadsheet programs treat them as text; the text does not say whether this was fixed.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A CSV file is a plain text table that spreadsheet programs like Excel open. Some spreadsheet programs treat any cell starting with =, +, - or @ as a formula and run it, and formulas can sometimes launch other programs. Here the export tool copied user data into the file without neutralising those starting characters, so a malicious entry could become a live formula.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by kenziy

View all

2 more disclosed reports, best first.

More from Bitwarden

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.