Skip to content

Symfony Vulnerable to PHP Eval Injection

Moderate severity GitHub Reviewed Published May 17, 2022 to the GitHub Advisory Database • Updated Apr 25, 2024

Package

composer symfony/http-kernel (Composer)

Affected versions

>= 2.0.0, < 2.3.27
>= 2.4.0, < 2.5.11
>= 2.6.0, < 2.6.6

Patched versions

2.3.27
2.5.11
2.6.6
composer symfony/symfony (Composer)
>= 2.0.0, < 2.3.27
>= 2.4.0, < 2.5.11
>= 2.6.0, < 2.6.6
2.3.27
2.5.11
2.6.6

Description

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).

References

Published by the National Vulnerability Database Jun 24, 2015
Published to the GitHub Advisory Database May 17, 2022
Reviewed Apr 25, 2024
Last updated Apr 25, 2024

Severity

Moderate

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(67th percentile)

Weaknesses

Improper Control of Generation of Code ('Code Injection')

The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. Learn more on MITRE.

CVE ID

CVE-2015-2308

GHSA ID

GHSA-5c58-w9xc-qcj9

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy