VDB
Sign up
MEDIUM

GHSA-5c58-w9xc-qcj9

Symfony Vulnerable to PHP Eval Injection

Quick fix

GHSA-5c58-w9xc-qcj9 — symfony/symfony: upgrade to the fixed version with the command below.

composer require symfony/symfony:^2.3.27

Details

Applications with ESI support (and SSI support as of Symfony 2.6) enabled and using the Symfony built-in reverse proxy (the `Symfony\Component\HttpKernel\HttpCache class) are vulnerable to PHP code injection; a malicious user can inject PHP code that will be executed by the server.

HttpCache uses eval() to execute files in its cache when they contain ESI tags (and only when ESI is enabled). The vulnerability comes from the fact that PHP allows contents of <script language="php"> tags to be executed (and this kind of PHP tags is always available regardless of the configuration), but there were not escaped before the evaluation.

A possible exploit comes from websites also vulnerable to Cross-Site Scripting as an attacker can successfully conduct a PHP code injection attack by passing such a tag in a user submitted variable (for which proper output escaping was not applied).

Are you affected?

Enter the version of the package you're using.

Affected packages

Packagist/symfony/symfony
Introduced in: 2.0.0Fixed in: 2.3.27
Fixcomposer require symfony/symfony:^2.3.27
Packagist/symfony/symfony
Introduced in: 2.4.0Fixed in: 2.5.11
Fixcomposer require symfony/symfony:^2.5.11
Packagist/symfony/symfony
Introduced in: 2.6.0Fixed in: 2.6.6
Fixcomposer require symfony/symfony:^2.6.6
Packagist/symfony/http-kernel
Introduced in: 2.0.0Fixed in: 2.3.27
Fixcomposer require symfony/http-kernel:^2.3.27
Packagist/symfony/http-kernel
Introduced in: 2.4.0Fixed in: 2.5.11
Fixcomposer require symfony/http-kernel:^2.5.11
Packagist/symfony/http-kernel
Introduced in: 2.6.0Fixed in: 2.6.6
Fixcomposer require symfony/http-kernel:^2.6.6

References