# GHSA-7jmw-8259-q9jx: Traefik has unexpected behavior with IPv4-mapped IPv6 addresses

> Traefik incorrectly handles IPv4-mapped IPv6 addresses, allowing attackers to bypass IP-based access controls or security filters.

- **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:** 11 Jun 2024
- **Also known as:** GO-2024-2917

## What is GHSA-7jmw-8259-q9jx?

GHSA-7jmw-8259-q9jx is a vulnerability in github.com/traefik/traefik, published on 11 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact

There is a vulnerability in [Go managing various Is methods (IsPrivate, IsLoopback, etc) for IPv4-mapped IPv6 addresses](https://groups.google.com/g/golang-announce/c/XbxouI9gY7k/m/TuoGEhxIEwAJ).

They didn't work as expected returning false for addresses which would return true in their traditional IPv4 forms.

### References

- [CVE-2024-24790](https://www.cve.org/CVERecord?id=CVE-2024-24790)

### Patches

- https://github.com/traefik/traefik/releases/tag/v2.11.4
- https://github.com/traefik/traefik/releases/tag/v3.0.2

### Workarounds

No workaround.

### For more information

If you have any questions or comments about this advisory, please [open an issue](https://github.com/traefik/traefik/issues).

## Which versions are affected by GHSA-7jmw-8259-q9jx?

9 open source packages ship an affected version, including github.com/traefik/traefik, github.com/traefik/traefik/v2 and github.com/traefik/traefik/v3.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/traefik/traefik` | Go | All versions | None |
| `github.com/traefik/traefik` | Go | All versions | 2.11.4 |
| `github.com/traefik/traefik` | Go | All versions | 2.11.4 |
| `github.com/traefik/traefik/v2` | Go | All versions | 2.11.4 |
| `github.com/traefik/traefik/v2` | Go | All versions | 2.11.4 |
| `github.com/traefik/traefik/v2` | Go | All versions | 2.11.4 |
| `github.com/traefik/traefik/v3` | Go | From 3.0.0-beta3 | 3.0.2 |
| `github.com/traefik/traefik/v3` | Go | From 3.0.0-beta3 | 3.0.2 |
| `github.com/traefik/traefik/v3` | Go | From 3.0.0-beta3 | 3.0.2 |

## How do I fix GHSA-7jmw-8259-q9jx?

Upgrade github.com/traefik/traefik to 2.11.4 or later.

## Is GHSA-7jmw-8259-q9jx being exploited?

There is no known exploitation of GHSA-7jmw-8259-q9jx in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-7jmw-8259-q9jx and fix it if it is affected.

What it is: GHSA-7jmw-8259-q9jx is a vulnerability in github.com/traefik/traefik, published on 11 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-7jmw-8259-q9jx in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/traefik/traefik (Go): affected all versions; no fix listed
- github.com/traefik/traefik (Go): affected all versions; fixed in 2.11.4
- github.com/traefik/traefik (Go): affected all versions; fixed in 2.11.4
- github.com/traefik/traefik/v2 (Go): affected all versions; fixed in 2.11.4
- github.com/traefik/traefik/v2 (Go): affected all versions; fixed in 2.11.4
- github.com/traefik/traefik/v2 (Go): affected all versions; fixed in 2.11.4
- github.com/traefik/traefik/v3 (Go): affected from 3.0.0-beta3; fixed in 3.0.2
- github.com/traefik/traefik/v3 (Go): affected from 3.0.0-beta3; fixed in 3.0.2
- github.com/traefik/traefik/v3 (Go): affected from 3.0.0-beta3; fixed in 3.0.2

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-7jmw-8259-q9jx/ (Markdown: https://insights.sbomify.com/GHSA-7jmw-8259-q9jx/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-7jmw-8259-q9jx

---
From sbomify Insights: https://insights.sbomify.com/GHSA-7jmw-8259-q9jx/
Summaries are generated and may contain mistakes; the official description above is the record.
