Symfony Vulnerable to PHP Eval Injection
Published 17 May 2022 · Updated 8 Dec 2024
Is your project on an affected symfony/symfony?
Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=2.0.0 <2.3.27
- Fixed in
- 2.3.27
composer require symfony/symfony:^2.3.27- Affected
- >=2.4.0 <2.5.11
- Fixed in
- 2.5.11
composer require symfony/symfony:^2.5.11- Affected
- >=2.6.0 <2.6.6
- Fixed in
- 2.6.6
composer require symfony/symfony:^2.6.6- Affected
- >=2.0.0 <2.3.27
- Fixed in
- 2.3.27
composer require symfony/http-kernel:^2.3.27- Affected
- >=2.4.0 <2.5.11
- Fixed in
- 2.5.11
composer require symfony/http-kernel:^2.5.11- Affected
- >=2.6.0 <2.6.6
- Fixed in
- 2.6.6
composer require symfony/http-kernel:^2.6.6Details
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).
Is GHSA-5c58-w9xc-qcj9 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected symfony/symfony, and gives you the command that fixes it.
More advisories for symfony/symfony
- HighCVE-2026-109413Symfony: Unbounded Recursion in the YAML Inline Lexer Lets a Single Document Crash the Process · 27 Oct 2026
- HighCVE-2026-108082Symfony: ReDoS in HeaderUtils::split() Reachable Through the Cache-Control Request Header · 27 Oct 2026
- MediumCVE-2026-48784Symfony: UrlGenerator Dot-Segment Encoding Skips Every Other Chained `../` or `./` → Generated URL Collapses Off-Route Under RFC 3986 Normalization · 15 Jun 2026
- MediumCVE-2026-48760Symfony: HtmlSanitizer URL Parser Deny Gates Underinclusive: Percent-Encoded BiDi Marks and Unicode Whitespace Bypass Visual-Spoofing Defense · 15 Jun 2026
- MediumCVE-2026-48747Symfony: Mailomat Mailer Webhook Parser Reads the HMAC Algorithm from the Request: Signature Algorithm Downgrade · 15 Jun 2026
- MediumCVE-2026-48736Symfony: IpUtils::PRIVATE_SUBNETS Omits IPv6 Transition Forms (6to4, NAT64, Teredo, IPv4-compatible): SSRF Bypass in NoPrivateNetworkHttpClient · 15 Jun 2026
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2015-2308
- Linkgithub.com/symfony/symfony/pull/14167/commits/195c57e1f50765aff33137689b16e126a689056a
- Linkgithub.com/FriendsOfPHP/security-advisories/blob/master/symfony/http-kernel/CVE-2015-2308.yaml
- Linkgithub.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2015-2308.yaml
- Packagegithub.com/symfony/symfony
- Linksymfony.com/blog/cve-2015-2308-esi-code-injection
- Linksymfony.com/cve-2015-2308
- Linkweb.archive.org/web/20200228084751/http://www.securityfocus.com/bid/75357
- Linkjvn.jp/en/jp/JVN19578958/index.html
- Linkjvndb.jvn.jp/jvndb/JVNDB-2015-000089
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.