CVE-2019-15092 WordPress Plugin Import Export Users = 1.3.0 – CSV Injection
The WordPress plugin Import Export Users did not sanitise user-supplied fields when exporting to CSV, allowing a subscriber to inject formulas. When an administrator opened the exported file in a spreadsheet program, the malicious formula could execute commands on the administrator's computer.
medium.com
Published on medium.com
CSV Injection, also known as Formula Injection, occurs when websites embed untrusted input inside CSV files. When a spreadsheet program such as Microsoft Excel or LibreOffice Calc is used to open a CSV, any cells starting with ‘=’ will be interpreted by the software as a formula.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The plugin's export function did not check whether user-controlled fields began with formula-triggering characters such as '=', '+', '-', or '@'.
Impact
A subscriber could execute commands on an administrator's computer if the administrator exported users and opened the file in a vulnerable spreadsheet program.
What the attacker needed
A subscriber account; admin exports users to CSV; admin opens file in spreadsheet software
The fix
The plugin should ensure that exported CSV cells do not begin with '=', '+', '-', or '@'.
How it was found
- Log in as a subscriber and change the First name, Surname, and Alias fields to a malicious formula.
- Log in as an administrator and export all users to CSV.
- Open the exported CSV file with Microsoft Office; the field begins with '=' followed by a PowerShell command.
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 write-up has not been written yet. The Original tab links to the source.
CSV injection happens when a program puts user input into a spreadsheet file without checking it. If a cell starts with a special character like '=', spreadsheet software treats it as a formula and runs it. Here, a low-privileged user could put such a formula into their profile, and when an admin exported and opened the file, the formula could run commands on the admin's computer.