CWE-1236: Improper Neutralization of Formula Elements in a CSV File
318 CVEs have CWE-1236 as their primary weakness. 0 of them are in the CISA KEV catalog. The highest EPSS score among them is 79.003%.
The product saves user-provided information into a Comma-Separated Value (CSV) file, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as a command when the file is opened by a spreadsheet product.
Child of CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component
Mitigations
- Implementation: When generating CSV output, ensure that formula-sensitive metacharacters are effectively escaped or removed from all data before storage in the resultant CSV. Risky characters include '=' (equal), '+' (plus), '-' (minus), and '@' (at).
- Implementation: If a field starts with a formula character, prepend it with a ' (single apostrophe), which prevents Excel from executing the formula.
- Architecture and Design: Certain implementations of spreadsheet software might disallow formulas from executing if the file is untrusted, or if the file is not authored by the current user.
Observed examples
- CVE-2019-12134: Low privileged user can trigger CSV injection through a contact form field value
- CVE-2019-4521: Cloud management product allows arbitrary command execution via CSV injection
- CVE-2019-17661: CSV injection in content management system via formula code in a first or last name
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-1236'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-1236'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).