CVEfocus › CVE database › CVE-2021-41270

CVE-2021-41270CSV Injection in Symfony

CVSS 6.5 MediumEPSS 1.4% (higher than 73% of CVEs)Published 2021-11-24Updated 2024-08-04Assigner: GitHub_M

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

CWE-1236

What to do

Fixed builds are available from Debian, Packagist: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

5Fixed
2Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 20.04symfonyFix pending4.3.8+dfsg-1ubuntu1+esm1 (Ubuntu Pro)UBUNTU-CVE-2021-41270
Ubuntu 16.04symfonyFix pending
Debian 14symfonyFixed4.4.19+dfsg-3DEBIAN-CVE-2021-41270
Debian 13symfonyFixed4.4.19+dfsg-3DEBIAN-CVE-2021-41270
Debian 12symfonyFixed4.4.19+dfsg-3DEBIAN-CVE-2021-41270
Packagist librarysymfony/serializerFixed5.3.12GHSA-2xhg-w2g5-w95x
Packagist librarysymfony/symfonyFixed4.4.35GHSA-2xhg-w2g5-w95x

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.