# GHSA-xjw3-5r5c-m5ph: typo3 Security fix for Flow Swift Mailer package

> Remote code execution in Swift Mailer library when using non-default mail transports, requiring an upgrade to mitigate.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Jun 2024

## What is GHSA-xjw3-5r5c-m5ph?

GHSA-xjw3-5r5c-m5ph is a code injection vulnerability in typo3/swiftmailer, published on 5 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A remote code execution vulnerability has been found in the Swift Mailer library (swiftmailer/swiftmailer) recently. See this advisory for details. If you are not using the default mail() transport, this particular problem  does not affect you. Upgrading is of course still recommended!

## Which versions are affected by GHSA-xjw3-5r5c-m5ph?

4 open source packages ship an affected version, including typo3/swiftmailer.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `typo3/swiftmailer` | Packagist | From 4.1.0 | 4.1.99 |
| `typo3/swiftmailer` | Packagist | From 4.1.0 | 4.1.99 |
| `typo3/swiftmailer` | Packagist | From 5.4.0 | 5.4.5 |
| `typo3/swiftmailer` | Packagist | From 5.4.0 | 5.4.5 |

## How do I fix GHSA-xjw3-5r5c-m5ph?

Upgrade typo3/swiftmailer to a fixed version for your release line: 4.1.99 or 5.4.5.

## Is GHSA-xjw3-5r5c-m5ph being exploited?

There is no known exploitation of GHSA-xjw3-5r5c-m5ph in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-xjw3-5r5c-m5ph and fix it if it is affected.

What it is: GHSA-xjw3-5r5c-m5ph is a code injection vulnerability in typo3/swiftmailer, published on 5 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-xjw3-5r5c-m5ph in the wild and no public exploit code.

Affected packages and fixed versions:
- typo3/swiftmailer (Packagist): affected from 4.1.0; fixed in 4.1.99
- typo3/swiftmailer (Packagist): affected from 4.1.0; fixed in 4.1.99
- typo3/swiftmailer (Packagist): affected from 5.4.0; fixed in 5.4.5
- typo3/swiftmailer (Packagist): affected from 5.4.0; fixed in 5.4.5

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-xjw3-5r5c-m5ph/ (Markdown: https://insights.sbomify.com/GHSA-xjw3-5r5c-m5ph/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-xjw3-5r5c-m5ph

---
From sbomify Insights: https://insights.sbomify.com/GHSA-xjw3-5r5c-m5ph/
Summaries are generated and may contain mistakes; the official description above is the record.
