# CVE-2021-41270: CSV Injection in Symfony

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.40%, higher than 73% of CVEs (2026-12-01)
- Published: 2021-11-24T19:05:11.000Z
- Modified: 2026-07-08T06:28:50.736Z
- Also known as: GHSA-2xhg-w2g5-w95x, BIT-SYMFONY-2021-41270
- Weaknesses: CWE-1236
- Assigned by: GitHub_M

## Description

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 `@`.

(As written by CVE List.)

## Affected

- symfony symfony: >= 4.1.0, < 4.4.35; >= 5.0.0, < 5.3.12
- symfony/serializer (Packagist): from 5.0.0 before 5.3.12; from 4.1.0 before 4.4.35
- symfony/symfony (Packagist): from 4.1.0 before 4.4.35; from 5.0.0 before 5.3.12
- sensiolabs symfony: from 4.1.0 before 4.4.35; from 5.0.0 before 5.3.12
- fedoraproject fedora: 34; 35
- symfony (Bitnami): from 4.1.0 before 4.4.35; from 5.0.0 before 5.3.12

## Every score

- GitHub_M: 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`
- GitHub: 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`
- NVD: CVSS:2.0 4.0 Medium `AV:N/AC:L/Au:S/C:P/I:N/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/symfony/symfony/pull/44243> (patch, third-party-advisory, web)
- <https://github.com/symfony/symfony/releases/tag/v5.3.12> (release-notes, third-party-advisory, web)
- <https://github.com/symfony/symfony/security/advisories/GHSA-2xhg-w2g5-w95x> (patch, third-party-advisory, web)
- <https://github.com/symfony/symfony/commit/3da6f2d45e7536ccb2a26f52fbaf340917e208a8> (patch, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QSREFD2TJT5LWKM6S4MD3W26NQQ5WJUP/> (vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3BPT4SF6SIXFMZARDWED5T32J7JEH3EP/> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-41270> (advisory)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/serializer/CVE-2021-41270.yaml> (web)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2021-41270.yaml> (web)
- <https://github.com/symfony/symfony> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3BPT4SF6SIXFMZARDWED5T32J7JEH3EP> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QSREFD2TJT5LWKM6S4MD3W26NQQ5WJUP> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3BPT4SF6SIXFMZARDWED5T32J7JEH3EP> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QSREFD2TJT5LWKM6S4MD3W26NQQ5WJUP> (web)
- <https://symfony.com/cve-2021-41270> (web)

## Sources

- CVE List: [CVE-2021-41270](https://www.cve.org/CVERecord?id=CVE-2021-41270), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-2xhg-w2g5-w95x](https://github.com/advisories/GHSA-2xhg-w2g5-w95x), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-41270](https://nvd.nist.gov/vuln/detail/CVE-2021-41270), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-SYMFONY-2021-41270](https://osv.dev/vulnerability/BIT-SYMFONY-2021-41270), Apache-2.0, modified 2024-03-06

---

Page: https://cve.day/CVE-2021-41270 · Whole record: https://cve.day/CVE-2021-41270.json · Rebuilt by cve.day 2026-11-25T22:58:05.758Z
