Code injection in the way Symfony implements translation caching in FrameworkBundle
When investigating issue #11093, Jeremy Derussé found a serious code injection issue in the way Symfony implements translation caching in FrameworkBundle.
-
Your Symfony application is vulnerable if you meet the following conditions:
-
You are using the Symfony translation system from FrameworkBundle (so basically if you are using Symfony full-stack -- you are not affected if you are using the Translation component with Silex for instance); You don't sanitize locales coming from a URL (any route with a _locale argument for instance):
When vulnerable, an attacker can submit a non-valid locale value that can contain some PHP code that will be executed by Symfony. That's because the locale value is dumped into a PHP file generated in the cache without being sanitized first.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | symfony/framework-bundle | >= 2.0.0, < 2.3.18, >= 2.4.0, < 2.4.8, >= 2.5.0, < 2.5.2 | 2.3.18, 2.4.8, 2.5.2 |
| Composer package | symfony/symfony | >= 2.0.0, < 2.3.19, >= 2.4.0, < 2.4.9, >= 2.5.0, < 2.5.4 | 2.3.19, 2.4.9, 2.5.4 |
References
- https://github.com/symfony/symfony/commit/06a80fbdbe744ad6f3010479ba64ef5cf35dd9af.patch
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/framework-bundle/CVE-2014-4931.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2014-4931.yaml
- https://symfony.com/blog/security-releases-cve-2014-4931-symfony-2-3-18-2-4-8-and-2-5-2-released
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N- Weakness (CWE)
CWE-94- Platform
- Composer
- Package
symfony/framework-bundle, symfony/symfony- Disclosed
- 30.05.2024
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-wfv7-5x33-v22h - CC BY 4.0
Vulnerability history: symfony/symfony
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 100
- First → latest
- 11.2019 06.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 8
- High 28
- Medium 51
- Low 13
Disclosures per year
- 2019: 6
- 2020: 7
- 2021: 6
- 2022: 29
- 2023: 5
- 2024: 16
- 2025: 1
- 2026: 30
-
Code injection in the way Symfony implements translation caching in FrameworkBundle this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.