Skip to content
Fencer Intel
medium 6.5

CVE-2021-41270 json

CSV Injection in Symfony

published 4y ago modified 4mo 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

Is CVE-2021-41270 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Exploit prediction

1.40% chance of exploitation in the next 30 days, higher than 72% of all scored CVEs (FIRST EPSS, 2026-11-09).

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

Sources

Fencer Intel 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.