CVE-2021-41270 json
CSV Injection in Symfony
published 2021-11-24 4 y ago modified 2026-07-08 4 mo ago also BIT-symfony-2021-41270 , EUVD-2021-2280 , GHSA-2xhg-w2g5-w95x
- cvss
- 6.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 72%
- public exploits
- 0
- none known
Summary
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 `@`.
Patch / fix
- packagist symfony/serializer 4.4.35, 5.3.12
- packagist symfony/symfony 4.4.35, 5.3.12
- bitnami symfony 4.4.35, 5.3.12
- sensiolabs symfony 4.4.35, 5.3.12
- symfony Debian 14, Debian 13, Debian 12 4.4.19+dfsg-3
debian advisories DEBIAN-CVE-2021-41270
- symfony Ubuntu Pro 20.04 LTS 4.3.8+dfsg-1ubuntu1+esm1
ubuntu advisories UBUNTU-CVE-2021-41270
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Exploit prediction
1.40% chance of exploitation in the next 30 days, higher than 72% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 4.0 | AV:N/AC:L/Au:S/C:P/I:N/A:N |
| OSV | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | symfony/serializer | >=5.0.0, <5.3.12 >=4.1.0, <4.4.35 |
5.3.12 4.4.35 |
| packagist | symfony/symfony | >=4.1.0, <4.4.35 >=5.0.0, <5.3.12 |
4.4.35 5.3.12 |
| bitnami | symfony | >=4.1.0, <4.4.35 >=5.0.0, <5.3.12 |
4.4.35 5.3.12 |
Affected products
- symfony symfony
Classification
- Weakness
-
- CWE-1236 Improper Neutralization of Formula Elements in a CSV File
References
-
github.com
/symfony/symfony/pull/44243
web, patch, third-party-advisory
-
github.com
/symfony/symfony/commit/3da6f2d45e7536ccb2a26f52fbaf340917e208a8
web, patch, third-party-advisory
-
github.com
/symfony/symfony/security/advisories/GHSA-2xhg-w2g5-w95x
web, patch, third-party-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/QSREFD2TJT5LWKM6S4MD3W26NQQ5WJUP/
vendor-advisory, web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/3BPT4SF6SIXFMZARDWED5T32J7JEH3EP/
vendor-advisory, web
-
github.com
/symfony/symfony/releases/tag/v5.3.12
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-41270
advisory
-
github.com
/FriendsOfPHP/security-advisories/blob/master/symfony/serializer/CVE-2021-41270.yaml
web
-
github.com
/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2021-41270.yaml
web
-
github.com
/symfony/symfony
package
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/3BPT4SF6SIXFMZARDWED5T32J7JEH3EP
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/QSREFD2TJT5LWKM6S4MD3W26NQQ5WJUP
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/3BPT4SF6SIXFMZARDWED5T32J7JEH3EP
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/QSREFD2TJT5LWKM6S4MD3W26NQQ5WJUP
web
-
symfony.com
/cve-2021-41270
web
Sources
- CVE List CVE-2021-41270
- GitHub Advisory GHSA-2xhg-w2g5-w95x
- NVD CVE-2021-41270
- OSV BIT-symfony-2021-41270
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.