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).
jvn.jp/en/jp/JVN19578958/index.html
jvndb.jvn.jp/jvndb/JVNDB-2015-000089
github.com/FriendsOfPHP/security-advisories/blob/master/symfony/http-kernel/CVE-2015-2308.yaml
github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2015-2308.yaml
github.com/symfony/symfony
github.com/symfony/symfony/pull/14167/commits/195c57e1f50765aff33137689b16e126a689056a
nvd.nist.gov/vuln/detail/CVE-2015-2308
symfony.com/blog/cve-2015-2308-esi-code-injection
symfony.com/cve-2015-2308
web.archive.org/web/20200228084751/www.securityfocus.com/bid/75357