# GHSA-v3mr-gp7j-pw5w: Possible SQL injection in tablelookupwizard Contao Extension

> An SQL injection vulnerability in the Contao tablelookupwizard extension allows attackers to manipulate database queries via unsanitized widget values.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 10 Feb 2022

## What is GHSA-v3mr-gp7j-pw5w?

GHSA-v3mr-gp7j-pw5w is a SQL injection vulnerability in terminal42/contao-tablelookupwizard, published on 10 Feb 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

### Impact
The currently selected widget values were not correctly sanitized before passing it to the database, leading to an SQL injection possibility.

### Patches
The issue has been patched in `tablelookupwizard` version 3.3.5 and version 4.0.0.

### For more information
If you have any questions or comments about this advisory:
* Open an issue in https://github.com/terminal42/contao-tablelookupwizard
* Email us at [info@terminal42.ch](mailto:info@terminal42.ch)

## Which versions are affected by GHSA-v3mr-gp7j-pw5w?

2 open source packages ship an affected version, including terminal42/contao-tablelookupwizard.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `terminal42/contao-tablelookupwizard` | Packagist | All versions | 3.3.5 |
| `terminal42/contao-tablelookupwizard` | Packagist | All versions | 3.3.5 |

## How do I fix GHSA-v3mr-gp7j-pw5w?

Upgrade terminal42/contao-tablelookupwizard to 3.3.5 or later.

## Is GHSA-v3mr-gp7j-pw5w being exploited?

There is no known exploitation of GHSA-v3mr-gp7j-pw5w in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-v3mr-gp7j-pw5w and fix it if it is affected.

What it is: GHSA-v3mr-gp7j-pw5w is a SQL injection vulnerability in terminal42/contao-tablelookupwizard, published on 10 Feb 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-v3mr-gp7j-pw5w in the wild and no public exploit code.

Affected packages and fixed versions:
- terminal42/contao-tablelookupwizard (Packagist): affected all versions; fixed in 3.3.5
- terminal42/contao-tablelookupwizard (Packagist): affected all versions; fixed in 3.3.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-v3mr-gp7j-pw5w/ (Markdown: https://insights.sbomify.com/GHSA-v3mr-gp7j-pw5w/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-v3mr-gp7j-pw5w

---
From sbomify Insights: https://insights.sbomify.com/GHSA-v3mr-gp7j-pw5w/
Summaries are generated and may contain mistakes; the official description above is the record.
