# GHSA-jhjp-4c2q-xmx4: k8saudit shipped rules do not detect privileged/sensitive settings on init or ephemeral containers

> Attackers with pod creation rights can bypass privileged container detection by using init or ephemeral containers, evading default audit rules.

- **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:** 21 Sep 2026
- **Also known as:** GO-2026-6538

## What is GHSA-jhjp-4c2q-xmx4?

GHSA-jhjp-4c2q-xmx4 is a vulnerability in github.com/falcosecurity/plugins/plugins/k8saudit, published on 21 Sep 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

The `k8saudit` plugin's per-container fields (`ka.req.pod.containers.*`) and the shipped `k8s_audit_rules.yaml` evaluated only `requestObject.spec.containers`. Security-relevant settings on a pod's `initContainers` or `ephemeralContainers` were not inspected, so the shipped `Create Privileged Pod` rule did not fire for a privileged container placed in either list.

### Impact

An actor able to create pods (the activity k8saudit is intended to audit) could run a privileged container without triggering the default `Create Privileged Pod` rule, by declaring it as an `initContainer` or `ephemeralContainer` instead of a regular container. Kubernetes runs such containers with the requested privileges, but the shipped rule did not see them. The same gap applied to other per-container security settings (capabilities, `allowPrivilegeEscalation`, `runAsUser`, etc.) and, for deployments using a customized image allowlist, to disallowed images placed in those lists.

This is a detection bypass of the default k8saudit ruleset, not a direct privilege escalation, and it requires the ability to create pods. The cloud-provider variants (`k8saudit-eks`, `k8saudit-gke`, `k8saudit-aks`, `k8saudit-ovh`) embed the same extraction logic and ship the same ruleset, and were affected equally.

Note: adding an ephemeral container goes through the `pods/ephemeralcontainers` subresource, so the `EphemeralContainers Created` rule still logged that event at `NOTICE`, but without any privileged/security evaluation.

### Patches

Fixed in `k8saudit 0.18.0`, and in the cloud-variant releases that depend on it — `k8saudit-eks 0.12.0`, `k8saudit-gke 0.9.0`, `k8saudit-aks 0.6.0`, `k8saudit-ovh 0.6.0` — all released on 2026-06-19.

The fix ([falcosecurity/plugins#1400](https://github.com/falcosecurity/plugins/pull/1400), merged 2026-06-18) adds dedicated `ka.req.pod.initContainers.*` and `ka.req.pod.ephemeralContainers.*` field families and updates `Create Privileged Pod` (via a new `any_container_privileged` macro) to evaluate all three container lists.

Operators upgrading should review any **custom** rules built on `ka.req.pod.containers.*` — in particular tuned `Create Disallowed Pod` image allowlists — and extend them to the new `initContainers`/`ephemeralContainers` image fields.

### Workarounds

For deployments that cannot upgrade immediately, restrict who can create pods (RBAC) and enforce Pod Security Admission (`baseline`/`restricted`) or an admission controller (Kyverno, OPA/Gatekeeper) to block privileged init/ephemeral containers at admission time, as defense-in-depth.

### Credits

[kanywst](https://github.com/kanywst) — discovery and fix.

## Which versions are affected by GHSA-jhjp-4c2q-xmx4?

15 open source packages ship an affected version, including github.com/falcosecurity/plugins/plugins/k8saudit, github.com/falcosecurity/plugins/plugins/k8saudit-aks and github.com/falcosecurity/plugins/plugins/k8saudit-eks.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/falcosecurity/plugins/plugins/k8saudit` | Go | All versions | 0.18.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit` | Go | All versions | 0.18.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit` | Go | All versions | 0.18.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit-aks` | Go | All versions | 0.6.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit-aks` | Go | All versions | 0.6.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit-aks` | Go | All versions | 0.6.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit-eks` | Go | All versions | 0.12.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit-eks` | Go | All versions | 0.12.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit-eks` | Go | All versions | 0.12.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit-gke` | Go | All versions | 0.9.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit-gke` | Go | All versions | 0.9.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit-gke` | Go | All versions | 0.9.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit-ovh` | Go | All versions | 0.6.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit-ovh` | Go | All versions | 0.6.0 |
| `github.com/falcosecurity/plugins/plugins/k8saudit-ovh` | Go | All versions | 0.6.0 |

## How do I fix GHSA-jhjp-4c2q-xmx4?

Upgrade github.com/falcosecurity/plugins/plugins/k8saudit to 0.18.0 or later.

## Is GHSA-jhjp-4c2q-xmx4 being exploited?

There is no known exploitation of GHSA-jhjp-4c2q-xmx4 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-jhjp-4c2q-xmx4 and fix it if it is affected.

What it is: GHSA-jhjp-4c2q-xmx4 is a vulnerability in github.com/falcosecurity/plugins/plugins/k8saudit, published on 21 Sep 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-jhjp-4c2q-xmx4 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/falcosecurity/plugins/plugins/k8saudit (Go): affected all versions; fixed in 0.18.0
- github.com/falcosecurity/plugins/plugins/k8saudit (Go): affected all versions; fixed in 0.18.0
- github.com/falcosecurity/plugins/plugins/k8saudit (Go): affected all versions; fixed in 0.18.0
- github.com/falcosecurity/plugins/plugins/k8saudit-aks (Go): affected all versions; fixed in 0.6.0
- github.com/falcosecurity/plugins/plugins/k8saudit-aks (Go): affected all versions; fixed in 0.6.0
- github.com/falcosecurity/plugins/plugins/k8saudit-aks (Go): affected all versions; fixed in 0.6.0
- github.com/falcosecurity/plugins/plugins/k8saudit-eks (Go): affected all versions; fixed in 0.12.0
- github.com/falcosecurity/plugins/plugins/k8saudit-eks (Go): affected all versions; fixed in 0.12.0
- github.com/falcosecurity/plugins/plugins/k8saudit-eks (Go): affected all versions; fixed in 0.12.0
- github.com/falcosecurity/plugins/plugins/k8saudit-gke (Go): affected all versions; fixed in 0.9.0
- github.com/falcosecurity/plugins/plugins/k8saudit-gke (Go): affected all versions; fixed in 0.9.0
- github.com/falcosecurity/plugins/plugins/k8saudit-gke (Go): affected all versions; fixed in 0.9.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/GHSA-jhjp-4c2q-xmx4/ (Markdown: https://insights.sbomify.com/GHSA-jhjp-4c2q-xmx4/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-jhjp-4c2q-xmx4

---
From sbomify Insights: https://insights.sbomify.com/GHSA-jhjp-4c2q-xmx4/
Summaries are generated and may contain mistakes; the official description above is the record.
