{"id":"CVE-2021-41270","published":"2021-11-24T19:05:11Z","modified":"2024-08-04T03:08:31Z","title":"CSV Injection in Symfony","vendor":"symfony","product":"symfony","tier":"tail","description":{"text":"Symfony/Serializer handles serializing and deserializing data structures for Symfony, a PHP framework for web and console applications and a set of reusable PHP components. Symfony versions 4.1.0 before 4.4.35 and versions 5.0.0 before 5.3.12 are vulnerable to CSV injection, also known as formula injection. In Symfony 4.1, maintainers added the opt-in `csv_escape_formulas` option in the `CsvEncoder`, to prefix all cells starting with `=`, `+`, `-` or `@` with a tab `\\t`. Since then, OWASP added 2 chars in that list: Tab (0x09) and Carriage return (0x0D). This makes the previous prefix char (Tab `\\t`) part of the vulnerable characters, and OWASP suggests using the single quote `'` for prefixing the value. Starting with versions 4.4.34 and 5.3.12, Symfony now follows the OWASP recommendations and uses the single quote `'` to prefix formulas and add the prefix to cells starting by `\\t`, `\\r` as well as `=`, `+`, `-` and `@`.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.014,"percentile":0.7316,"provenance":"source"},"cwes":[{"id":"CWE-1236","name":"Improper Neutralization of Formula Elements in a CSV File"}],"references":[{"url":"https://github.com/symfony/symfony/pull/44243","tags":["x_refsource_MISC"]},{"url":"https://github.com/symfony/symfony/releases/tag/v5.3.12","tags":["x_refsource_MISC"]},{"url":"https://github.com/symfony/symfony/security/advisories/GHSA-2xhg-w2g5-w95x","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/symfony/symfony/commit/3da6f2d45e7536ccb2a26f52fbaf340917e208a8","tags":["x_refsource_MISC"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QSREFD2TJT5LWKM6S4MD3W26NQQ5WJUP/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3BPT4SF6SIXFMZARDWED5T32J7JEH3EP/","tags":["vendor-advisory","x_refsource_FEDORA"]}],"priority":{"score":19.2,"factors":[{"name":"EPSS percentile","points":14.63},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"symfony","affectedVersions":[{"vendor":"symfony","product":"symfony","versions":[">= 4.1.0, < 4.4.35",">= 5.0.0, < 5.3.12"]}],"affected":[{"ecosystem":"Packagist","package":"symfony/serializer","vulnerableRanges":[">=5.0.0, <5.3.12",">=4.1.0, <4.4.35"],"patched":["5.3.12","4.4.35"],"from":["GHSA-2xhg-w2g5-w95x"],"provenance":"source"},{"ecosystem":"Packagist","package":"symfony/symfony","vulnerableRanges":[">=4.1.0, <4.4.35",">=5.0.0, <5.3.12"],"patched":["4.4.35","5.3.12"],"from":["GHSA-2xhg-w2g5-w95x"],"provenance":"source"}],"summary":{"text":"The flaw is a CSV injection (formula injection) weakness in the CSV encoder of Symfony's Serializer component, affecting the Symfony framework in the 4.1.0 to 4.4.35 and 5.0.0 to 5.3.12 ranges. An attacker who can get a value beginning with =, +, -, @, tab, or carriage return into serialized output can have spreadsheet software interpret it as a formula. Per the attack vector, exploitation is reachable over the network with low attack complexity, requires low privileges, and needs no user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:33:31Z"},"euvd":{"id":"EUVD-2021-2280","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2021-21424","published":"2021-05-13","fixed":"5.2.9","kev":false,"link":{"from":"CVE-2021-21424","to":"CVE-2021-41270","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:symfony/symfony","fromFixed":"4.4.24","toFixed":"4.4.35","daysApart":195}]}},{"cve":"CVE-2021-32693","published":"2021-06-17","fixed":"5.3.2","kev":false,"link":{"from":"CVE-2021-32693","to":"CVE-2021-41270","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:symfony/symfony","fromFixed":"5.3.2","toFixed":"5.3.12","daysApart":160}]}},{"cve":"CVE-2021-41267","published":"2021-11-24","fixed":"5.3.12","kev":false},{"cve":"CVE-2021-41268","published":"2021-11-24","fixed":"5.3.12","kev":false},{"cve":"CVE-2021-41270","published":"2021-11-24","fixed":"5.3.12","kev":false},{"cve":"CVE-2022-24894","published":"2023-02-03","fixed":"6.2.6","kev":false,"link":{"from":"CVE-2021-41270","to":"CVE-2022-24894","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:symfony/symfony","fromFixed":"4.4.35","toFixed":"4.4.50","daysApart":436},{"kind":"version-step","provenance":"source","package":"Packagist:symfony/symfony","fromFixed":"5.3.12","toFixed":"5.4.20","daysApart":436}]}},{"cve":"CVE-2022-24895","published":"2023-02-03","fixed":"6.2.6","kev":false,"link":{"from":"CVE-2021-41270","to":"CVE-2022-24895","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:symfony/symfony","fromFixed":"4.4.35","toFixed":"4.4.50","daysApart":436},{"kind":"version-step","provenance":"source","package":"Packagist:symfony/symfony","fromFixed":"5.3.12","toFixed":"5.4.20","daysApart":436}]}},{"cve":"CVE-2023-46733","published":"2023-11-10","fixed":"6.3.8","kev":false}],"package":"Packagist:symfony/symfony"}}