# GHSA-45xg-4w5x-j429: TYPO3 Arbitrary Shell Execution in Swiftmailer library

> Attackers can execute arbitrary shell commands in TYPO3 installations using sendmail transport without a Return-Path configured.

- **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:** 30 May 2024

## What is GHSA-45xg-4w5x-j429?

GHSA-45xg-4w5x-j429 is a command injection vulnerability in typo3/cms, published on 30 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The swiftmailer library in use allows to execute arbitrary shell commands if the "From" header comes from a non-trusted source and no "Return-Path" is configured. Affected are only TYPO3 installation the configuration option
```
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport'] 
```
is set to "sendmail". Installations with the default configuration are not affected.

## Which versions are affected by GHSA-45xg-4w5x-j429?

8 open source packages ship an affected version, including typo3/cms.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `typo3/cms` | Packagist | From 4.5.0 | 4.5.37 |
| `typo3/cms` | Packagist | From 4.5.0 | 4.5.37 |
| `typo3/cms` | Packagist | From 4.7.0 | 4.7.20 |
| `typo3/cms` | Packagist | From 4.7.0 | 4.7.20 |
| `typo3/cms` | Packagist | From 6.1.0 | 6.1.12 |
| `typo3/cms` | Packagist | From 6.1.0 | 6.1.12 |
| `typo3/cms` | Packagist | From 6.2.0 | 6.2.6 |
| `typo3/cms` | Packagist | From 6.2.0 | 6.2.6 |

## How do I fix GHSA-45xg-4w5x-j429?

Upgrade typo3/cms to a fixed version for your release line: 4.5.37, 4.7.20, 6.1.12 or 6.2.6.

## Is GHSA-45xg-4w5x-j429 being exploited?

There is no known exploitation of GHSA-45xg-4w5x-j429 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-45xg-4w5x-j429 and fix it if it is affected.

What it is: GHSA-45xg-4w5x-j429 is a command injection vulnerability in typo3/cms, published on 30 May 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-45xg-4w5x-j429 in the wild and no public exploit code.

Affected packages and fixed versions:
- typo3/cms (Packagist): affected from 4.5.0; fixed in 4.5.37
- typo3/cms (Packagist): affected from 4.5.0; fixed in 4.5.37
- typo3/cms (Packagist): affected from 4.7.0; fixed in 4.7.20
- typo3/cms (Packagist): affected from 4.7.0; fixed in 4.7.20
- typo3/cms (Packagist): affected from 6.1.0; fixed in 6.1.12
- typo3/cms (Packagist): affected from 6.1.0; fixed in 6.1.12
- typo3/cms (Packagist): affected from 6.2.0; fixed in 6.2.6
- typo3/cms (Packagist): affected from 6.2.0; fixed in 6.2.6

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-45xg-4w5x-j429/ (Markdown: https://insights.sbomify.com/GHSA-45xg-4w5x-j429/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-45xg-4w5x-j429

---
From sbomify Insights: https://insights.sbomify.com/GHSA-45xg-4w5x-j429/
Summaries are generated and may contain mistakes; the official description above is the record.
