ZendFramework potential remote code execution in zend-mail via Sendmail adapter
Impact
When using the zend-mail component to send email via the Zend\Mail\Transport\Sendmail transport, a malicious user may be able to inject arbitrary parameters to the system sendmail program. The attack is performed by providing additional quote characters within an address; when unsanitized, they can be interpreted as additional command line arguments, leading to the vulnerability.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| From 2.0.0 before 2.4.11Ecosystem versions | 2.4.11 |
Version evidence: OSV · GHSA-gff2-p6vm-3p8g
View original version evidence (58 explicit versions)
Original source description
When using the zend-mail component to send email via the Zend\Mail\Transport\Sendmail transport, a malicious user may be able to inject arbitrary parameters to the system sendmail program. The attack is performed by providing additional quote characters within an address; when unsanitized, they can be interpreted as additional command line arguments, leading to the vulnerability.
References
- Patch github.com/zendframework/zendframework/commit/7c1e89815f5a9c016f4b8088e59b07cb2bf99dc0
- Security advisory github.com/FriendsOfPHP/security-advisories/blob/master/zendframework/zendframework/ZF2016-04.yaml
- Source reference github.com/zendframework/zendframework
- Security advisory web.archive.org/web/20201107093523/https://framework.zend.com/security/advisory/ZF2016-04