CVE-2021-41270
CSV Injection in Symfony
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
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 `@`.
Symfony/Serializer maneja la serialización y deserialización de estructuras de datos para Symfony, un framework PHP para aplicaciones web y de consola y un conjunto de componentes PHP reusables. Symfony versiones 4.1.0 anteriores a 4.4.35 y versiones 5.0.0 anteriores a 5.3.12, son vulnerables a una inyección de CSV, también se conoce como inyección de fórmulas. En Symfony 4.1, los mantenedores añadieron la opción "csv_escape_formulas" en el "CsvEncoder", para prefijar todas las celdas que empiezan con "=", "+", "-" o "@" con un tabulador "\t". Desde entonces, OWASP ha añadido 2 caracteres en esa lista: Tabulador (0x09) y retorno de Carro (0x0D). Esto hace que el anterior carácter de prefijo (Tab "\t") forme parte de los caracteres vulnerables, y OWASP sugiere usar la comilla simple "'" para prefijar el valor. A partir de las versiones 4.4.34 y 5.3.12, Symfony ahora sigue las recomendaciones de OWASP y usa la comilla simple "'" para prefijar las fórmulas y añadir el prefijo a las celdas que empiezan por "\t", "\r" así como "=", "+", "-" y "@"
CVSS Scores
SSVC
- Decision:-
Timeline
- 2021-09-15 CVE Reserved
- 2021-11-24 CVE Published
- 2023-10-11 EPSS Updated
- 2024-08-04 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-1236: Improper Neutralization of Formula Elements in a CSV File
CAPEC
References (6)
URL | Tag | Source |
---|---|---|
https://github.com/symfony/symfony/releases/tag/v5.3.12 | Release Notes |
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Sensiolabs Search vendor "Sensiolabs" | Symfony Search vendor "Sensiolabs" for product "Symfony" | >= 4.1.0 < 4.4.35 Search vendor "Sensiolabs" for product "Symfony" and version " >= 4.1.0 < 4.4.35" | - |
Affected
| ||||||
Sensiolabs Search vendor "Sensiolabs" | Symfony Search vendor "Sensiolabs" for product "Symfony" | >= 5.0.0 < 5.3.12 Search vendor "Sensiolabs" for product "Symfony" and version " >= 5.0.0 < 5.3.12" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 34 Search vendor "Fedoraproject" for product "Fedora" and version "34" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 35 Search vendor "Fedoraproject" for product "Fedora" and version "35" | - |
Affected
|