---
title: "GHSA-4qpj-gxxg-jqg4: Swiftmailer Sendmail transport arbitrary shell execution"
url: https://erroneo.us/security/ghsa/GHSA-4qpj-gxxg-jqg4/
description: "GHSA-4qpj-gxxg-jqg4 (critical, Composer (PHP)): Swiftmailer Sendmail transport arbitrary shell execution. Prior to 5.2.1, the sendmail transport…"
type: advisory
section: "Security Digest"
date_published: 2024-05-29
date_modified: 2024-05-29
publisher: erroneo.us
author: erroneo.us Security Desk
ghsa: "GHSA-4qpj-gxxg-jqg4"
license: All rights reserved. Quote with attribution and a link.
---

# GHSA-4qpj-gxxg-jqg4: Swiftmailer Sendmail transport arbitrary shell execution

## Affected packages

- Composer (PHP) `swiftmailer/swiftmailer` >= 4.0.0, < 5.2.1 → fixed: 5.2.1

## Details

Prior to 5.2.1, the sendmail transport (SwiftTransportSendmailTransport) was vulnerable to an arbitrary shell execution if the "From" header came from a non-trusted source and no "Return-Path" is configured. This has been fixed in 5.2.1. If you are using sendmail as a transport, you are encouraged to upgrade as soon as possible.

## Sources

- [GitHub Advisory GHSA-4qpj-gxxg-jqg4](https://github.com/advisories/GHSA-4qpj-gxxg-jqg4)
- [github.com](https://github.com/swiftmailer/swiftmailer/commit/b4b78af55e5e87f5ff07c06c6be7963c44562f80)
- [github.com](https://github.com/swiftmailer/swiftmailer/commit/efc430606a5faed864b969adfbdc5363ce2115a2)
- [github.com](https://github.com/FriendsOfPHP/security-advisories/blob/master/swiftmailer/swiftmailer/2014-06-13.yaml)
- [web.archive.org](https://web.archive.org/web/20150219063146/http://blog.swiftmailer.org/post/88660759928/security-fix-swiftmailer-5-2-1-released)
- [blog.swiftmailer.org](http://blog.swiftmailer.org/post/88660759928/security-fix-swiftmailer-5-2-1-released)

---
Source page: https://erroneo.us/security/ghsa/GHSA-4qpj-gxxg-jqg4/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
