# CVE-2023-1260: Kube-apiserver: privesc


- **Severity:** High 8.0 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 24 Sep 2023
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-92hx-3mh6-hc49, RHSA-2023:3976, RHSA-2023:4312, RHSA-2023:4898

## What is CVE-2023-1260?

CVE-2023-1260 is a high-severity vulnerability in Redhat Openshift Container Platform, published on 24 Sep 2023. 

### Official description

An authentication bypass vulnerability was discovered in kube-apiserver. This issue could allow a remote, authenticated attacker who has been given permissions "update, patch" the "pods/ephemeralcontainers" subresource beyond what the default is. They would then need to create a new pod or patch one that they already have access to. This might allow evasion of SCC admission restrictions, thereby gaining control of a privileged pod.

Weakness: CWE-288 (Authentication Bypass Using an Alternate Path or Channel)

## Which versions are affected by CVE-2023-1260?

2 open source packages ship an affected version, including github.com/openshift/apiserver-library-go. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/openshift/apiserver-library-go` | Go | All versions | 0.0.0-20230621 |
| `github.com/openshift/apiserver-library-go` | Go | All versions | 0.0.0-20230621 |
| `openshift` | Red Hat:openshift:4.10::el7 | All versions | 0:4.10.0-202308291228.p0.g26fdcdf.assembly.stream.el7 |
| `openshift-hyperkube` | Red Hat:openshift:4.10::el7 | All versions | 0:4.10.0-202308291228.p0.g26fdcdf.assembly.stream.el7 |
| `openshift` | Red Hat:openshift:4.10::el8 | All versions | 0:4.10.0-202308291228.p0.g26fdcdf.assembly.stream.el8 |
| `openshift-hyperkube` | Red Hat:openshift:4.10::el8 | All versions | 0:4.10.0-202308291228.p0.g26fdcdf.assembly.stream.el8 |
| `openshift` | Red Hat:openshift:4.11::el8 | All versions | 0:4.11.0-202307200925.p0.ga9da4a8.assembly.stream.el8 |
| `openshift-hyperkube` | Red Hat:openshift:4.11::el8 | All versions | 0:4.11.0-202307200925.p0.ga9da4a8.assembly.stream.el8 |
| `openshift` | Red Hat:openshift:4.12::el8 | All versions | 0:4.12.0-202307040929.p0.g1485cc9.assembly.stream.el8 |
| `openshift-hyperkube` | Red Hat:openshift:4.12::el8 | All versions | 0:4.12.0-202307040929.p0.g1485cc9.assembly.stream.el8 |
| `openshift` | Red Hat:openshift:4.12::el9 | All versions | 0:4.12.0-202307040929.p0.g1485cc9.assembly.stream.el9 |
| `openshift-hyperkube` | Red Hat:openshift:4.12::el9 | All versions | 0:4.12.0-202307040929.p0.g1485cc9.assembly.stream.el9 |

Products: Kubernetes Kube-Apiserver, Redhat Openshift Container Platform.

## How do I fix CVE-2023-1260?

Upgrade github.com/openshift/apiserver-library-go to 0.0.0-20230621 or later.

## Is CVE-2023-1260 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-1260 and fix it if it is affected.

What it is: CVE-2023-1260 is a high-severity vulnerability in Redhat Openshift Container Platform, published on 24 Sep 2023. 
Exploitation: There is no known exploitation of CVE-2023-1260 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/openshift/apiserver-library-go (Go): affected all versions; fixed in 0.0.0-20230621
- github.com/openshift/apiserver-library-go (Go): affected all versions; fixed in 0.0.0-20230621

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

## Sources

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

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