# GHSA-prqf-xr2j-xf65: Potential privilege escalation on Kubernetes >= v1.19 when the Argo Sever is run with `--auth-mode=client`

> Attackers can escalate privileges to the server account when Argo Server uses client auth mode on non-Kubernetes deployments.

- **Severity:** Not scored
- **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 Aug 2021
- **Also known as:** GO-2022-0405

## What is GHSA-prqf-xr2j-xf65?

GHSA-prqf-xr2j-xf65 is a vulnerability in github.com/argoproj/argo-workflows, published on 23 Aug 2021. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Impact

This is pro-active fix. No know exploits exist. 

Impacted:

* You're running Kubernetes >= v1.19
* You're running Argo Server
* It is configured to with `--auth-mode=client`
* Is not configured with `--auth-mode=server`
* You are not running Argo Server in Kubernetes pod. E.g. on bare metal or other VM.
* You're using client key to authenticate on the server. 
* The server has more permissions that the connecting client's account.

The client's authentication will be ignored and the server's authentication will be used. This will result in privilege escalation to that of the the server's account.

### Patches

https://github.com/argoproj/argo-workflows/pull/6506

### Workarounds

None.

## Which versions are affected by GHSA-prqf-xr2j-xf65?

7 open source packages ship an affected version, including github.com/argoproj/argo-workflows/v3, github.com/argoproj/argo-workflows and github.com/argoproj/argo-workflows/v2.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/argoproj/argo-workflows/v3` | Go | From 3.0.0 | 3.0.9, 3.1.6 |
| `github.com/argoproj/argo-workflows/v3` | Go | From 3.0.0 | 3.0.9 |
| `github.com/argoproj/argo-workflows/v3` | Go | From 3.0.0 | 3.0.9 |
| `github.com/argoproj/argo-workflows/v3` | Go | From 3.1.0 | 3.1.6 |
| `github.com/argoproj/argo-workflows/v3` | Go | From 3.1.0 | 3.1.6 |
| `github.com/argoproj/argo-workflows` | Go | All versions | None |
| `github.com/argoproj/argo-workflows/v2` | Go | All versions | None |

## How do I fix GHSA-prqf-xr2j-xf65?

Upgrade github.com/argoproj/argo-workflows/v3 to a fixed version for your release line: 3.0.9 or 3.1.6.

## Is GHSA-prqf-xr2j-xf65 being exploited?

There is no known exploitation of GHSA-prqf-xr2j-xf65 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-prqf-xr2j-xf65 and fix it if it is affected.

What it is: GHSA-prqf-xr2j-xf65 is a vulnerability in github.com/argoproj/argo-workflows, published on 23 Aug 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-prqf-xr2j-xf65 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/argoproj/argo-workflows/v3 (Go): affected from 3.0.0; fixed in 3.0.9, 3.1.6
- github.com/argoproj/argo-workflows/v3 (Go): affected from 3.0.0; fixed in 3.0.9
- github.com/argoproj/argo-workflows/v3 (Go): affected from 3.0.0; fixed in 3.0.9
- github.com/argoproj/argo-workflows/v3 (Go): affected from 3.1.0; fixed in 3.1.6
- github.com/argoproj/argo-workflows/v3 (Go): affected from 3.1.0; fixed in 3.1.6
- github.com/argoproj/argo-workflows (Go): affected all versions; no fix listed
- github.com/argoproj/argo-workflows/v2 (Go): affected all versions; no fix listed

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-prqf-xr2j-xf65/ (Markdown: https://insights.sbomify.com/GHSA-prqf-xr2j-xf65/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-prqf-xr2j-xf65

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