How I Chained Mass Assignment and CSV Injection to Exfiltrate Corporate Data
A mass assignment flaw let the attacker inject hidden CSV formula payloads into vendor records, which executed when an administrator exported the vendor list, sending other vendors' private email addresses to the attacker's server. The attacker then used the stolen emails to test login rate limiting, which could be bypassed by rotating the X-Forwarded-For header.
systemweakness.com
Published on systemweakness.com
Recently, while performing a security assessment on a B2B vendor management platform (let’s call it “VendorHub”), I stumbled upon a fascinating kill chain. What started as a routine check of a registration form evolved into a scenario where I could force an administrator to unknowingly export their database directly…
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
Likely the server bound raw JSON input directly to its database model without restricting which fields were allowed, and the export function did not neutralise formula characters.
Impact
An attacker could exfiltrate private email addresses of other vendors and then perform password spraying against those accounts without being rate-limited, though the text only confirms the rate-limit bypass, not a successful account takeover.
What the attacker needed
A low-privileged test account; admin exports and opens the file; admin enables editing or clicks a cell
The fix
The text does not state that the issues were fixed; it recommends strictly defining allowed fields, prefixing formula characters in exports, and not trusting the X-Forwarded-For header for rate limiting.
How it was found
- Register a company with a simple formula in the description field and confirm it evaluates in the exported spreadsheet.
- Intercept the registration request and add a hidden parameter containing a formula that fetches data from neighbouring cells.
- Wait for an administrator to export the vendor list and open the file, either enabling editing or clicking the disguised error cell.
- Receive the exfiltrated data at the attacker's server.
- Use the stolen email addresses to attempt login brute force, observing a block after five attempts.
- Rotate the X-Forwarded-For header to bypass the rate limiter and continue the attack.
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.
Mass assignment is when a website accepts extra fields in a form submission that it never intended to accept, saving them into its database. CSV injection is when a spreadsheet program treats text from a website as a formula, so opening an exported file can make the spreadsheet send data to an attacker. Here, the attacker hid a formula in an unused field, and when an admin exported the data, the formula leaked other companies' email addresses.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.