CVE-2021-41270
CSV Injection in Symfony
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 @.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.5
CSV Injection in Symfony
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 @.
- Record
CVE-2021-41270- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-1236
- Updated
- 2026-11-02
EUVDEUVD-2021-2280
6.5
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 @.
- Record
EUVD-2021-2280- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-2xhg-w2g5-w95x
6.5
CSV Injection in symfony/serializer
Description
CSV Injection, also known as Formula Injection, occurs when websites embed untrusted input inside CSV files. When a spreadsheet program opens a CSV, any cell starting with = is interpreted by the software as a formula and could be abused by an attacker.
In Symfony 4.1, we've added the opt-in csv_escape_formulas option in CsvEncoder, to prefix all cells starting by =, +, - or @ by a tab \t.
Since then, OWASP added 2 chars in that list:
- Tab (0x09)
- Carriage return (0x0D)
This makes our previous prefix char (Tab \t) part of the vulnerable characters, and OWASP suggests using the single quote ' for prefixing the value.
Resolution
Symfony now follows the OWASP recommendations and use the single quote ' to prefix formulas and adds the prefix to cells starting by \t, \r as well as =, +, - and @.
The patch for this issue is available here for branch 4.4.
Credits
We would like to thank Jake Barwell for reporting the issue and Jérémy Derussé for fixing the issue.
- Record
GHSA-2xhg-w2g5-w95x- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-1236
- Updated
- 2026-11-02
NVD
6.5
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 @.
- Record
CVE-2021-41270- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - CVSS 2.0
- 4.0 Medium
AV:N/AC:L/Au:S/C:P/I:N/A:N - Weakness
- CWE-1236
- Updated
- 2026-11-02
OSV
6.5
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 @.
- Record
CVE-2021-41270- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-41270
6.5
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 @.
- Record
DEBIAN-CVE-2021-41270- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-2xhg-w2g5-w95x
6.5
CSV Injection in symfony/serializer
Description
CSV Injection, also known as Formula Injection, occurs when websites embed untrusted input inside CSV files. When a spreadsheet program opens a CSV, any cell starting with = is interpreted by the software as a formula and could be abused by an attacker.
In Symfony 4.1, we've added the opt-in csv_escape_formulas option in CsvEncoder, to prefix all cells starting by =, +, - or @ by a tab \t.
Since then, OWASP added 2 chars in that list:
- Tab (0x09)
- Carriage return (0x0D)
This makes our previous prefix char (Tab \t) part of the vulnerable characters, and OWASP suggests using the single quote ' for prefixing the value.
Resolution
Symfony now follows the OWASP recommendations and use the single quote ' to prefix formulas and adds the prefix to cells starting by \t, \r as well as =, +, - and @.
The patch for this issue is available here for branch 4.4.
Credits
We would like to thank Jake Barwell for reporting the issue and Jérémy Derussé for fixing the issue.
- Record
GHSA-2xhg-w2g5-w95x- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-1236
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-41270
6.5
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 @.
- Record
UBUNTU-CVE-2021-41270- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVBIT-symfony-2021-41270 No score
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 @.
- Record
BIT-symfony-2021-41270- Updated
- 2026-11-02
OSVUSN-5290-1 No score
symfony vulnerabilities
James Isaac and Mathias Brodala discovered that Symfony incorrectly handled switch users functionality. An attacker could possibly use this issue to enumerate users. (CVE-2021-21424)
It was discovered that Symfony incorrectly handled certain specially crafted CSV files. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 20.04 ESM. (CVE-2021-41270)
- Record
USN-5290-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
symfony/serializerPackagist |
5.0.0 up to 5.3.12 | 5.3.12 |
symfony/serializerPackagist |
4.1.0 up to 4.4.35 | 4.4.35 |
symfony/symfonyPackagist |
4.1.0 up to 4.4.35 | 4.4.35 |
symfony/symfonyPackagist |
5.0.0 up to 5.3.12 | 5.3.12 |
symfonyBitnami |
4.1.0 up to 4.4.35, 5.0.0 up to 5.3.12 | 4.4.355.3.12 |
symfonyDebian:12 |
before 4.4.19+dfsg-3 | 4.4.19+dfsg-3 |
symfonyDebian:13 |
before 4.4.19+dfsg-3 | 4.4.19+dfsg-3 |
symfonyDebian:14 |
before 4.4.19+dfsg-3 | 4.4.19+dfsg-3 |
symfony/serializerPackagist |
5.0.0 up to 5.3.12, plus listed versions v5.0.0v5.0.1v5.0.10v5.0.11v5.0.2 Show 45 moreShow lessv5.0.3v5.0.4v5.0.5v5.0.6v5.0.7v5.0.8v5.0.9v5.1.0v5.1.0-BETA1v5.1.0-RC1v5.1.0-RC2v5.1.1v5.1.10v5.1.11v5.1.2v5.1.3v5.1.4v5.1.5v5.1.6v5.1.7v5.1.8v5.1.9v5.2.0v5.2.0-BETA1v5.2.0-BETA2v5.2.0-BETA3v5.2.0-RC1v5.2.0-RC2v5.2.1v5.2.10v5.2.11v5.2.12v5.2.2v5.2.3v5.2.4v5.2.7v5.2.9v5.3.0v5.3.0-BETA1v5.3.0-BETA3v5.3.0-RC1v5.3.1v5.3.10v5.3.11v5.3.2 |
5.3.12 |
symfony/serializerPackagist |
4.1.0 up to 4.4.35, plus listed versions v4.1.0v4.1.1v4.1.10v4.1.11v4.1.12 Show 45 moreShow lessv4.1.2v4.1.3v4.1.4v4.1.5v4.1.6v4.1.7v4.1.8v4.1.9v4.2.0v4.2.0-BETA1v4.2.0-BETA2v4.2.0-RC1v4.2.1v4.2.10v4.2.11v4.2.12v4.2.2v4.2.3v4.2.4v4.2.5v4.2.6v4.2.7v4.2.8v4.2.9v4.3.0v4.3.0-BETA1v4.3.0-BETA2v4.3.0-RC1v4.3.1v4.3.10v4.3.11v4.3.2v4.3.3v4.3.4v4.3.5v4.3.6v4.3.7v4.3.8v4.3.9v4.4.0v4.4.0-BETA1v4.4.0-BETA2v4.4.0-RC1v4.4.1v4.4.10 |
4.4.35 |
Show 5 moreShow less
| Package | Affected | Fixed |
|---|---|---|
symfony/symfonyPackagist |
4.1.0 up to 4.4.35, plus listed versions v4.1.0v4.1.1v4.1.10v4.1.11v4.1.12 Show 45 moreShow lessv4.1.13v4.1.2v4.1.3v4.1.4v4.1.5v4.1.6v4.1.7v4.1.8v4.1.9v4.2.0v4.2.0-BETA1v4.2.0-BETA2v4.2.0-RC1v4.2.1v4.2.10v4.2.11v4.2.12v4.2.2v4.2.3v4.2.4v4.2.5v4.2.6v4.2.7v4.2.8v4.2.9v4.3.0v4.3.0-BETA1v4.3.0-BETA2v4.3.0-RC1v4.3.1v4.3.10v4.3.11v4.3.2v4.3.3v4.3.4v4.3.5v4.3.6v4.3.7v4.3.8v4.3.9v4.4.0v4.4.0-BETA1v4.4.0-BETA2v4.4.0-RC1v4.4.1 |
4.4.35 |
symfony/symfonyPackagist |
5.0.0 up to 5.3.12, plus listed versions v5.0.0v5.0.1v5.0.10v5.0.11v5.0.2 Show 45 moreShow lessv5.0.3v5.0.4v5.0.5v5.0.6v5.0.7v5.0.8v5.0.9v5.1.0v5.1.0-BETA1v5.1.0-RC1v5.1.0-RC2v5.1.1v5.1.10v5.1.11v5.1.2v5.1.3v5.1.4v5.1.5v5.1.6v5.1.7v5.1.8v5.1.9v5.2.0v5.2.0-BETA1v5.2.0-BETA2v5.2.0-BETA3v5.2.0-RC1v5.2.0-RC2v5.2.1v5.2.10v5.2.11v5.2.12v5.2.13v5.2.14v5.2.2v5.2.3v5.2.4v5.2.5v5.2.6v5.2.7v5.2.8v5.2.9v5.3.0v5.3.0-BETA1v5.3.0-BETA2 |
5.3.12 |
symfonyUbuntu:Pro:20.04:LTS |
before 4.3.8+dfsg-1ubuntu1+esm1, plus listed versions 4.3.4+dfsg-1ubuntu14.3.8+dfsg-1ubuntu1 |
4.3.8+dfsg-1ubuntu1+esm1 |
symfonyUbuntu:Pro:18.04:LTS From an advisory covering 2 CVEs |
before 3.4.6+dfsg-1ubuntu0.1+esm2, plus listed versions 2.8.7+dfsg-1.3ubuntu13.4.3+dfsg-1ubuntu43.4.6+dfsg-13.4.6+dfsg-1ubuntu0.13.4.6+dfsg-1ubuntu0.1+esm1 |
3.4.6+dfsg-1ubuntu0.1+esm2 |
symfonyUbuntu:Pro:20.04:LTS From an advisory covering 2 CVEs |
before 4.3.8+dfsg-1ubuntu1+esm1, plus listed versions 4.3.4+dfsg-1ubuntu14.3.8+dfsg-1ubuntu1 |
4.3.8+dfsg-1ubuntu1+esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-41270 is a medium vulnerability (CVSS 6.5) in Sensiolabs Symfony, published November 24, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.40%, the 72nd percentile. Fixed in symfony/serializer 5.3.12.
References
github.com/symfony/symfony/pull/44243
github.com/symfony/symfony/releases/tag/v5.3.12
github.com/symfony/symfony/security/advisories/GHSA-2xhg-w2g5-w95x
github.com/symfony/symfony/commit/3da6f2d45e7536ccb2a26f52fbaf340917e208a8
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QSREFD2TJT5LWKM6S4MD3W26NQQ5WJUP
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3BPT4SF6SIXFMZARDWED5T32J7JEH3EP
Show 13 moreShow less
nvd.nist.gov/vuln/detail/CVE-2021-41270
lists.fedoraproject.org/archives/list/[email protected]/message/3BPT4SF6SIXFMZARDWED5T32J7JEH3EP
lists.fedoraproject.org/archives/list/[email protected]/message/QSREFD2TJT5LWKM6S4MD3W26NQQ5WJUP
github.com/FriendsOfPHP/security-advisories/blob/master/symfony/serializer/CVE-2021-41270.yaml
github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2021-41270.yaml
symfony.com/cve-2021-41270
github.com/advisories/GHSA-2xhg-w2g5-w95x
security-tracker.debian.org/tracker/CVE-2021-41270
github.com/symfony/symfony
ubuntu.com/security/CVE-2021-41270
ubuntu.com/security/notices/USN-5290-1
cve.org/CVERecord?id=CVE-2021-41270
ubuntu.com/security/CVE-2021-21424
Left out here: 75 versions. The JSON record has them.