Vulnerability · Published Mar 15, 2024 · Assigned by GitHub_M

CVE-2024-28859Gadget chain in Symfony 1 due to vulnerable Swift Mailer dependency

Medium 5.0

In plain English

A medium-severity unsafe deserialization in symfony1 from FriendsOfSymfony1. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.6% (higher than 76% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.0Medium
Exploit odds (30 days)1.6%top 24.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Packagistfriendsofsymfony1/swiftmailer5.4.13GHSA-wjv8-pxr6-5f4r
Packagistfriendsofsymfony1/swiftmailer6.2.5GHSA-wjv8-pxr6-5f4r
Packagistfriendsofsymfony1/symfony11.5.18GHSA-wjv8-pxr6-5f4r
Packagistswiftmailer/swiftmailer6.2.5GHSA-wjv8-pxr6-5f4r

Affected products (as reported)

VendorProductVersions
FriendsOfSymfony1 symfony1 >= 1.3.0, < 1.5.18

Weakness: CWE-502 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

References