# GHSA-wxxw-5gq6-j2g5: contao/core Insufficient input validation allows for code injection and remote execution

> Attackers can execute arbitrary code or cause denial of service by exploiting insufficient input validation in Contao CMS.

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

## What is GHSA-wxxw-5gq6-j2g5?

GHSA-wxxw-5gq6-j2g5 is a code injection vulnerability in contao/core, published on 15 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

contao/core versions 2.x prior to 2.11.17 and 3.x prior to 3.2.9 are vulnerable to arbitrary code execution on the server due to insufficient input validation. In fact, attackers can remove or change pathconfig.php by entering a URL, meaning that the entire Contao installation will no longer be accessible or malicious code can be executed.

## Which versions are affected by GHSA-wxxw-5gq6-j2g5?

4 open source packages ship an affected version, including contao/core.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `contao/core` | Packagist | From 2.0.0 | 2.11.17 |
| `contao/core` | Packagist | From 2.0.0 | 2.11.17 |
| `contao/core` | Packagist | From 3.0.0 | 3.2.9 |
| `contao/core` | Packagist | From 3.0.0 | 3.2.9 |

## How do I fix GHSA-wxxw-5gq6-j2g5?

Upgrade contao/core to a fixed version for your release line: 2.11.17 or 3.2.9.

## Is GHSA-wxxw-5gq6-j2g5 being exploited?

There is no known exploitation of GHSA-wxxw-5gq6-j2g5 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-wxxw-5gq6-j2g5 and fix it if it is affected.

What it is: GHSA-wxxw-5gq6-j2g5 is a code injection vulnerability in contao/core, published on 15 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-wxxw-5gq6-j2g5 in the wild and no public exploit code.

Affected packages and fixed versions:
- contao/core (Packagist): affected from 2.0.0; fixed in 2.11.17
- contao/core (Packagist): affected from 2.0.0; fixed in 2.11.17
- contao/core (Packagist): affected from 3.0.0; fixed in 3.2.9
- contao/core (Packagist): affected from 3.0.0; fixed in 3.2.9

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-wxxw-5gq6-j2g5/ (Markdown: https://insights.sbomify.com/GHSA-wxxw-5gq6-j2g5/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-wxxw-5gq6-j2g5

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