Skip to main content

More Info:

Do not generally permit containers with the potentially dangerous NET_RAW capability.

Risk Level

Medium

Address

Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CIS GKE
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Manual Steps

  1. On any machine with kubectl access, list all namespaces and current pod security configuration to understand what’s enforcing capabilities today:
    If PSP is disabled (no PSP objects or admission plugin disabled), note that and proceed to step 4 (you’ll need another enforcement mechanism such as Pod Security Admission or a 3rd‑party policy engine).
  2. Still on a kubectl machine, identify which service accounts / namespaces currently use PSPs that do not drop NET_RAW:
    Review any associated RBAC bindings to see which subjects can use these PSPs:
  3. For representative workloads (especially in high‑risk namespaces like default, kube-system, and any user application namespaces), inspect pod specs to see actual capability usage:
    Use this list to talk with application owners and determine whether NET_RAW is actually required for any workload.
  4. Decide on a policy approach per namespace:
    • If PSP is available: design one or more PSPs that set:
      or:
      Then update RBAC so that only tightly‑controlled subjects can use any PSPs that allow NET_RAW (if such PSPs are truly necessary).
    • If PSP is not available: implement equivalent restrictions via your cluster’s policy mechanism (e.g., Pod Security Admission with restricted profile and custom policies, or OPA/Gatekeeper/Kyverno) and ensure they reject pods that add NET_RAW and/or do not drop it.
  5. Apply updated policies/manifests on a kubectl machine, in a staging environment first, then production. Coordinate with application teams for any namespaces that truly require NET_RAW and document explicit exceptions (namespaces, service accounts, and reasons). Where NET_RAW is required, prefer:
    • A dedicated namespace
    • Dedicated service accounts
    • A narrowly‑scoped policy/PSP granting NET_RAW only to those workloads
  6. Verify the effective state matches your intent:
    For each remaining pod with NET_RAW, ensure it is covered by a documented, approved exception and that policies prevent any other workload from acquiring NET_RAW.
Review each PSP’s .spec.requiredDropCapabilities:
  • Potential problem indicators:
    • requiredDropCapabilities is missing or empty.
    • requiredDropCapabilities does not contain NET_RAW or ALL.
    • PSPs used by untrusted workloads allow running without dropping NET_RAW.

In the output, look for RBAC rules that reference podsecuritypolicies.policy in .rules[].resources and see:
  • Which PSP names appear in .rules[].resourceNames.
  • Which subjects (ServiceAccounts, users, groups) are bound to those roles.
  • Potential problem indicators:
    • Namespaces/workloads that can use PSPs lacking NET_RAW (or ALL) in requiredDropCapabilities.
    • Broad bindings (e.g., to system:authenticated or system:serviceaccounts) to weak PSPs.

Review for:
  • add: ["NET_RAW"] or similar in any container capabilities.
  • Absence of drop: ["NET_RAW"]/["ALL"] where your policy expects it.
  • Potential problem indicators:
    • Untrusted or baseline workloads explicitly adding NET_RAW.
    • No consistent pattern of dropping NET_RAW for non‑privileged workloads.

Again, look for containers adding NET_RAW or not dropping capabilities where required.
  • While Pod Security Admission does not directly configure NET_RAW, labels like pod-security.kubernetes.io/enforce=privileged or baseline show how strict each namespace is.
  • Potential problem indicators:
    • Namespaces with privileged enforcement used for general or multi‑tenant workloads, where NET_RAW control is more critical.

These commands only surface the current state. A human must decide:
  • Which workloads legitimately require NET_RAW.
  • Which PSPs (or other admission controls) should enforce requiredDropCapabilities: ["NET_RAW"] or ["ALL"] for untrusted workloads.

Additional Reading: