GHSA-xf4v-w5x5-pv79
### Summary CSV formula injection (also known as formula injection or CSV injection) affects customer export. User-controlled values customer names, email addresses, and shipping addresses. When an administrator opens a crafted Export in Microsoft Excel or LibreOffice Calc, formulas embedded in user data execute in the context of the administrator's desktop, potentially exfiltrating data or executing OS commands via DDE (Dynamic Data Exchange). --- ### Details #### Affected presenters and fields | Presenter | Path | User-controlled fields | |---|---|---| | `CustomerPresenter` | `spree/core/app/presenters/spree/csv/customer_presenter.rb:36` | `first_name`, `last_name`, `address1`, `address2`, `city`, `phone` | #### Vulnerable code — `customer_presenter.rb` (representative example) ```ruby # spree/core/app/presenters/spree/csv/customer_presenter.rb:36–53 def call csv = [ customer.first_name, # ← written verbatim; may contain =HYPERLINK(...) customer.last_name, # ← user-controlled customer.email, customer.accepts_email_marketing ? Spree.t(:say_yes) : Spree.t(:say_no), customer.address&.company, # ← user-controlled customer.address&.address1, # ← user-controlled customer.address&.address2, # ← user-controlled customer.address&.city, # ← user-controlled customer.address&.state_text, customer.address&.state_abbr, customer.address&.country&.name, customer.address&.country&.iso, customer.address&.zipcode, customer.phone, # ← user-controlled customer.amount_spent_in(Spree::Store.current.default_currency), customer.completed_orders.count, ] csv += metafields_for_csv(customer) csv end ``` --- ### PoC **Precondition**: A Spree store with public customer registration enabled (default configuration). No special permissions required for the attacker. #### Step 1 — Register as a customer with an injected first name ```bash curl -X POST http
Properties
- ghsa_id
- GHSA-xf4v-w5x5-pv79
- severity
- medium
- summary
- Spree: CSV Formula Injection in Customer Export
- cve_id
- GHSA-xf4v-w5x5-pv79
- is_ghsa_only
- true
- ghsa_published
- 2026-06-04T18:46:04Z
- source_url
- https://github.com/advisories/GHSA-xf4v-w5x5-pv79
- ghsa_updated
- 2026-06-04T18:46:05Z
Related Entities (4)
VULNERABLE_TO (1)
AFFECTS (1)
HAS_WEAKNESS (1)
REPORTED_BY (1)
Explore deeper with Ninja Signal's threat intelligence graph