# CVE-2021-32783: Authorization bypass in Contour

> Attackers can bypass authorization to access Envoy admin interface, causing denial of service or exposing secret metadata in Contour.

- **Severity:** High 8.5 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Jul 2021
- **Updated:** 3 Aug 2024
- **Also known as:** BIT-contour-2021-32783, GHSA-5ph6-qq5x-7jwc, GO-2022-0922

## What is CVE-2021-32783?

CVE-2021-32783 is a high-severity authentication bypass vulnerability in projectcontour contour, published on 23 Jul 2021. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Contour is a Kubernetes ingress controller using Envoy proxy. In Contour before version 1.17.1 a specially crafted ExternalName type Service may be used to access Envoy's admin interface, which Contour normally prevents from access outside the Envoy container. This can be used to shut down Envoy remotely (a denial of service), or to expose the existence of any Secret that Envoy is using for its configuration, including most notably TLS Keypairs. However, it *cannot* be used to get the *content* of those secrets. Since this attack allows access to the administration interface, a variety of administration options are available, such as shutting down the Envoy or draining traffic. In general, the Envoy admin interface cannot easily be used for making changes to the cluster, in-flight requests, or backend services, but it could be used to shut down or drain Envoy, change traffic routing, or to retrieve secret metadata, as mentioned above. The issue will be addressed in Contour v1.18.0 and a cherry-picked patch release, v1.17.1, has been released to cover users who cannot upgrade at this time. For more details refer to the linked GitHub Security Advisory.

Weakness: CWE-610 (Externally Controlled Reference to a Resource in Another Sphere), CWE-441 (Unintended Proxy or Intermediary)

## Which versions are affected by CVE-2021-32783?

10 open source packages ship an affected version, including github.com/projectcontour/contour and contour. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/projectcontour/contour` | Go | All versions | 1.14.2, 1.15.2, 1.16.1, 1.17.1 |
| `github.com/projectcontour/contour` | Go | All versions | 1.14.2 |
| `github.com/projectcontour/contour` | Go | All versions | 1.14.2 |
| `github.com/projectcontour/contour` | Go | From 1.15.0 | 1.15.2 |
| `github.com/projectcontour/contour` | Go | From 1.15.0 | 1.15.2 |
| `github.com/projectcontour/contour` | Go | From 1.16.0 | 1.16.1 |
| `github.com/projectcontour/contour` | Go | From 1.16.0 | 1.16.1 |
| `github.com/projectcontour/contour` | Go | From 1.17.0 | 1.17.1 |
| `github.com/projectcontour/contour` | Go | From 1.17.0 | 1.17.1 |
| `contour` | Bitnami | All versions | 1.17.1 |

Products: Projectcontour Contour.

## How do I fix CVE-2021-32783?

Upgrade github.com/projectcontour/contour to a fixed version for your release line: 1.14.2, 1.15.2, 1.16.1 or 1.17.1.

## Is CVE-2021-32783 being exploited?

There is no known exploitation of CVE-2021-32783 in the wild and no public exploit code.

## Other vulnerabilities in projectcontour contour

- [CVE-2024-36539](https://insights.sbomify.com/CVE-2024-36539/): Missing authorization in n/a (critical 9.8)
- [CVE-2026-41246](https://insights.sbomify.com/CVE-2026-41246/): Contour: Lua code injection via Cookie Path Rewrite Policy (high 8.1)
- [CVE-2020-15127](https://insights.sbomify.com/CVE-2020-15127/): Denial of service in Contour (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-32783 and fix it if it is affected.

What it is: CVE-2021-32783 is a high-severity authentication bypass vulnerability in projectcontour contour, published on 23 Jul 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-32783 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/projectcontour/contour (Go): affected all versions; fixed in 1.14.2, 1.15.2, 1.16.1, 1.17.1
- github.com/projectcontour/contour (Go): affected all versions; fixed in 1.14.2
- github.com/projectcontour/contour (Go): affected all versions; fixed in 1.14.2
- github.com/projectcontour/contour (Go): affected from 1.15.0; fixed in 1.15.2
- github.com/projectcontour/contour (Go): affected from 1.15.0; fixed in 1.15.2
- github.com/projectcontour/contour (Go): affected from 1.16.0; fixed in 1.16.1
- github.com/projectcontour/contour (Go): affected from 1.16.0; fixed in 1.16.1
- github.com/projectcontour/contour (Go): affected from 1.17.0; fixed in 1.17.1
- github.com/projectcontour/contour (Go): affected from 1.17.0; fixed in 1.17.1
- contour (Bitnami): affected all versions; fixed in 1.17.1

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/CVE-2021-32783/ (Markdown: https://insights.sbomify.com/CVE-2021-32783/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-32783
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-32783
- OSV: https://osv.dev/vulnerability/CVE-2021-32783

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-32783/
Summaries are generated and may contain mistakes; the official description above is the record.
