Gadget chain in Symfony 1 due to vulnerable Swift Mailer dependency
Description
Symfony1 is a community fork of symfony 1.4 with DIC, form enhancements, latest Swiftmailer, better performance, composer compatible and PHP 8 support. Symfony 1 has a gadget chain due to vulnerable Swift Mailer dependency that would enable an attacker to get remote code execution if a developer unserialize user input in his project. This vulnerability present no direct threat but is a vector that will enable remote code execution if a developper deserialize user untrusted data. Symfony 1 depends on Swift Mailer which is bundled by default in vendor directory in the default installation since 1.3.0. Swift Mailer classes implement some __destruct() methods. These methods are called when php destroys the object in memory. However, it is possible to include any object type in $this->_keys to make PHP access to another array/object properties than intended by the developer. In particular, it is possible to abuse the array access which is triggered on foreach($this->_keys ...) for any class implementing ArrayAccess interface. This may allow an attacker to execute any PHP command which leads to remote code execution. This issue has been addressed in version 1.5.18. Users are advised to upgrade. There are no known workarounds for this vulnerability.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
friendsofsymfony1/symfony1Packagist | >= 1.3.0, < 1.5.18 | 1.5.18 |
friendsofsymfony1/swiftmailerPackagist | >= 4.0.0, < 5.4.13 | 5.4.13 |
friendsofsymfony1/swiftmailerPackagist | >= 6.0.0, < 6.2.5 | 6.2.5 |
swiftmailer/swiftmailerPackagist | >= 4.0.0, < 6.2.5 | 6.2.5 |
Affected products
4- ghsa-coords3 versionspkg:composer/friendsofsymfony1/swiftmailerpkg:composer/friendsofsymfony1/symfony1pkg:composer/swiftmailer/swiftmailer
>= 4.0.0, < 5.4.13+ 2 more
- (no CPE)range: >= 4.0.0, < 5.4.13
- (no CPE)range: >= 1.3.0, < 1.5.18
- (no CPE)range: >= 4.0.0, < 6.2.5
- Range: >= 1.3.0, < 1.5.18
Patches
Vulnerability mechanics
References
7- github.com/advisories/GHSA-wjv8-pxr6-5f4rghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-28859ghsaADVISORY
- github.com/FriendsOfPHP/security-advisories/blob/master/friendsofsymfony1/swiftmailer/CVE-2024-28859.yamlghsaWEB
- github.com/FriendsOfPHP/security-advisories/blob/master/friendsofsymfony1/symfony1/CVE-2024-28859.yamlghsaWEB
- github.com/FriendsOfPHP/security-advisories/blob/master/swiftmailer/swiftmailer/CVE-2024-28859.yamlghsaWEB
- github.com/FriendsOfSymfony1/symfony1/commit/edb850f94fb4de18ca53d0d1824910d6e8130166ghsax_refsource_MISCWEB
- github.com/FriendsOfSymfony1/symfony1/security/advisories/GHSA-wjv8-pxr6-5f4rghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.