# GHSA-pfhr-pccp-hwmh: Impact If a user has Network Policies with namespace selectors selecting labels of namespaces, or (clusterwide) Cilium Network Policies

> Attackers with pod deploy rights can craft labels to bypass Cilium network policies, allowing unauthorized network access between pods.

- **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:** 30 Aug 2022
- **Also known as:** GO-2022-0959

## What is GHSA-pfhr-pccp-hwmh?

GHSA-pfhr-pccp-hwmh is a vulnerability in github.com/cilium/cilium, published on 30 Aug 2022. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Impact

If a user has Network Policies with namespace selectors selecting labels of namespaces, or (clusterwide) Cilium Network Policies matching on namespace labels, then it is possible for an attacker with Kubernetes pod deploy rights (either directly or indirectly via higher-level APIs such as Deployment, Daemonset etc) to craft additional pod labels such that the pod is selected by another policy that exists rather than the expected policy. 

### Patches

The problem has been fixed and is available on versions >=1.10.14, >=1.11.8, >=1.12.1

### Workarounds

There are no workarounds available.

### Acknowledgements

The Cilium community has worked together with members of Isovalent to prepare these mitigations. Special thanks to Sander Mathijssen for not only highlighting the issue but also proposing a resolution. 

### For more information

If you have any questions or comments about this advisory, please reach out on [Slack](https://docs.cilium.io/en/latest/community/community/#slack).

As usual, if you think you found a related vulnerability, we strongly encourage you to report security vulnerabilities to our private security mailing list: [security@cilium.io](mailto:security@cilium.io) - first, before disclosing them in any public forums. This is a private mailing list where only members of the Cilium internal security team are subscribed to, and is treated as top priority.

## Which versions are affected by GHSA-pfhr-pccp-hwmh?

7 open source packages ship an affected version, including github.com/cilium/cilium.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cilium/cilium` | Go | All versions | 1.10.14, 1.11.8, 1.12.1 |
| `github.com/cilium/cilium` | Go | All versions | 1.10.14 |
| `github.com/cilium/cilium` | Go | All versions | 1.10.14 |
| `github.com/cilium/cilium` | Go | From 1.11.0 | 1.11.8 |
| `github.com/cilium/cilium` | Go | From 1.11.0 | 1.11.8 |
| `github.com/cilium/cilium` | Go | From 1.12.0 | 1.12.1 |
| `github.com/cilium/cilium` | Go | From 1.12.0 | 1.12.1 |

## How do I fix GHSA-pfhr-pccp-hwmh?

Upgrade github.com/cilium/cilium to a fixed version for your release line: 1.10.14, 1.11.8 or 1.12.1.

## Is GHSA-pfhr-pccp-hwmh being exploited?

There is no known exploitation of GHSA-pfhr-pccp-hwmh in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-pfhr-pccp-hwmh and fix it if it is affected.

What it is: GHSA-pfhr-pccp-hwmh is a vulnerability in github.com/cilium/cilium, published on 30 Aug 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-pfhr-pccp-hwmh in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cilium/cilium (Go): affected all versions; fixed in 1.10.14, 1.11.8, 1.12.1
- github.com/cilium/cilium (Go): affected all versions; fixed in 1.10.14
- github.com/cilium/cilium (Go): affected all versions; fixed in 1.10.14
- github.com/cilium/cilium (Go): affected from 1.11.0; fixed in 1.11.8
- github.com/cilium/cilium (Go): affected from 1.11.0; fixed in 1.11.8
- github.com/cilium/cilium (Go): affected from 1.12.0; fixed in 1.12.1
- github.com/cilium/cilium (Go): affected from 1.12.0; fixed in 1.12.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/GHSA-pfhr-pccp-hwmh/ (Markdown: https://insights.sbomify.com/GHSA-pfhr-pccp-hwmh/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-pfhr-pccp-hwmh

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