# CVE-2022-1996: Authorization Bypass Through User-Controlled Key in emicklei/go-restful

> An attacker can bypass authorization controls by manipulating user-controlled keys in the go-restful library, potentially accessing unauthorized resources.

- **Severity:** Critical 9.3 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 6 Jun 2022
- **Updated:** 3 Aug 2024
- **Also known as:** AZL-41344, CLEANSTART-2025-WF62094, CLEANSTART-2026-GY43798, CLEANSTART-2026-PI41655, DEBIAN-CVE-2022-1996, GHSA-r48q-9g5r-8q2h, GO-2022-0619, RHSA-2023:3229, RHSA-2023:3557, SUSE-SU-2022:3334-1, SUSE-SU-2022:3335-1, SUSE-SU-2023:4727-1, SUSE-SU-2024:0799-1, SUSE-SU-2024:4329-1, UBUNTU-CVE-2022-1996, openSUSE-SU-2022:10081-1, openSUSE-SU-2024:12205-1, openSUSE-SU-2024:12252-1, openSUSE-SU-2024:14081-1

## What is CVE-2022-1996?

CVE-2022-1996 is a critical authentication bypass vulnerability in Fedoraproject Fedora, published on 6 Jun 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Authorization Bypass Through User-Controlled Key in GitHub repository emicklei/go-restful prior to v3.8.0.

Weakness: CWE-639 (Authorization Bypass Through User-Controlled Key)

## Which versions are affected by CVE-2022-1996?

9 open source packages ship an affected version, including github.com/emicklei/go-restful, github.com/emicklei/go-restful/v2 and github.com/emicklei/go-restful/v3. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/emicklei/go-restful` | Go | All versions | 2.16.0 |
| `github.com/emicklei/go-restful` | Go | All versions | 2.16.0 |
| `github.com/emicklei/go-restful` | Go | All versions | 2.16.0+incompatible |
| `github.com/emicklei/go-restful/v2` | Go | All versions to 2.7.1 | None |
| `github.com/emicklei/go-restful/v2` | Go | All versions to 2.7.1 | None |
| `github.com/emicklei/go-restful/v2` | Go | From 2.7.1 | None |
| `github.com/emicklei/go-restful/v3` | Go | From 3.0.0 | 3.8.0 |
| `github.com/emicklei/go-restful/v3` | Go | From 3.0.0 | 3.8.0 |
| `github.com/emicklei/go-restful/v3` | Go | From 3.0.0 | 3.8.0 |
| `openshift-gitops-kam` | Red Hat:openshift_gitops:1.8::el8 | All versions | 0:1.8.3-6.el8 |
| `openshift-gitops-kam-redistributable` | Red Hat:openshift_gitops:1.8::el8 | All versions | 0:1.8.3-6.el8 |
| `openshift-gitops-kam` | Red Hat:openshift_gitops:1.9::el9 | All versions | 0:1.9.0-102.el8 |
| `openshift-gitops-kam-redistributable` | Red Hat:openshift_gitops:1.9::el9 | All versions | 0:1.9.0-102.el8 |
| `containerd` | SUSE:Enterprise Storage 7.1 | All versions | 1.7.8-150000.103.1 |
| `runc` | SUSE:Enterprise Storage 7.1 | All versions | 1.1.10-150000.55.1 |
| `catatonit` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 0.2.0-150000.3.6.1 |
| `containerd` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 1.7.8-150000.103.1 |
| `runc` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 1.1.10-150000.55.1 |
| `catatonit` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 0.2.0-150000.3.6.1 |
| `containerd` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 1.7.8-150000.103.1 |
| `runc` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 1.1.10-150000.55.1 |
| `containerd` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 1.7.8-150000.103.1 |
| `runc` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 1.1.10-150000.55.1 |
| `containerd` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.7.8-150000.103.1 |
| `runc` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.1.10-150000.55.1 |
| `containerd` | SUSE:Linux Enterprise Micro 5.1 | All versions | 1.7.8-150000.103.1 |
| `runc` | SUSE:Linux Enterprise Micro 5.1 | All versions | 1.1.10-150000.55.1 |
| `containerd` | SUSE:Linux Enterprise Micro 5.2 | All versions | 1.7.8-150000.103.1 |
| `runc` | SUSE:Linux Enterprise Micro 5.2 | All versions | 1.1.10-150000.55.1 |
| `containerd` | SUSE:Linux Enterprise Micro 5.3 | All versions | 1.7.8-150000.103.1 |
| `runc` | SUSE:Linux Enterprise Micro 5.3 | All versions | 1.1.10-150000.55.1 |
| `containerd` | SUSE:Linux Enterprise Micro 5.4 | All versions | 1.7.8-150000.103.1 |
| `runc` | SUSE:Linux Enterprise Micro 5.4 | All versions | 1.1.10-150000.55.1 |
| `containerd` | SUSE:Linux Enterprise Micro 5.5 | All versions | 1.7.8-150000.103.1 |
| `runc` | SUSE:Linux Enterprise Micro 5.5 | All versions | 1.1.10-150000.55.1 |
| `containerd` | SUSE:Linux Enterprise Module for Containers 12 | All versions | 1.7.8-16.91.7 |
| `containerized-data-importer` | SUSE:Linux Enterprise Module for Containers 15 SP3 | All versions | 1.43.2-150300.8.9.3 |
| `containerd` | SUSE:Linux Enterprise Module for Containers 15 SP4 | All versions | 1.7.8-150000.103.1 |
| `containerized-data-importer` | SUSE:Linux Enterprise Module for Containers 15 SP4 | All versions | 1.51.0-150400.4.3.1 |
| `runc` | SUSE:Linux Enterprise Module for Containers 15 SP4 | All versions | 1.1.10-150000.55.1 |

Products: Fedoraproject Fedora, Go-Restful Project Go-Restful.

## How do I fix CVE-2022-1996?

Upgrade github.com/emicklei/go-restful to a fixed version for your release line: 2.16.0 or 2.16.0+incompatible.

## Is CVE-2022-1996 being exploited?

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

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2024-4577](https://insights.sbomify.com/CVE-2024-4577/): PHP-CGI OS Command Injection (critical 9.8, exploited in the wild)
- [CVE-2021-39226](https://insights.sbomify.com/CVE-2021-39226/): Grafana Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2019-5544](https://insights.sbomify.com/CVE-2019-5544/): VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2024-4947](https://insights.sbomify.com/CVE-2024-4947/): Google Chromium V8 Type Confusion (critical 9.6, exploited in the wild)
- [CVE-2024-4671](https://insights.sbomify.com/CVE-2024-4671/): Google Chromium Visuals Use-After-Free (critical 9.6, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-1996 and fix it if it is affected.

What it is: CVE-2022-1996 is a critical authentication bypass vulnerability in Fedoraproject Fedora, published on 6 Jun 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2022-1996 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/emicklei/go-restful (Go): affected all versions; fixed in 2.16.0
- github.com/emicklei/go-restful (Go): affected all versions; fixed in 2.16.0
- github.com/emicklei/go-restful (Go): affected all versions; fixed in 2.16.0+incompatible
- github.com/emicklei/go-restful/v2 (Go): affected all versions up to 2.7.1; no fix listed
- github.com/emicklei/go-restful/v2 (Go): affected all versions up to 2.7.1; no fix listed
- github.com/emicklei/go-restful/v2 (Go): affected from 2.7.1; no fix listed
- github.com/emicklei/go-restful/v3 (Go): affected from 3.0.0; fixed in 3.8.0
- github.com/emicklei/go-restful/v3 (Go): affected from 3.0.0; fixed in 3.8.0
- github.com/emicklei/go-restful/v3 (Go): affected from 3.0.0; fixed in 3.8.0

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

## Sources

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

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