CVE-2022-29178: Github.com/cilium/cilium Access To Unix Domain Socket Vulnerability

HIGH
Advisory Identifier: GHSA-6p8v-8cq8-v2r3
CVSS 8.8
CWE-276
Published
Advisory Summary

CVE-2022-29178 is a HIGH (CVSS 8.8) access to unix domain socket vulnerability (CWE-276: Incorrect Default Permissions) affecting Github.com/cilium/cilium libraries in the Go ecosystem. The issue involves access to unix domain socket can lead to privileges escalation in cilium. Remediation is available by upgrading affected packages to version 1.11.5, 1.10.11, 1.9.16.

CVE-2022-29178 at a Glance

CVE Identifier CVE-2022-29178
GHSA Identifier GHSA-6p8v-8cq8-v2r3
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-276: Incorrect Default Permissions
Affected Product Github.com/cilium/cilium
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2022-29178

To remediate this vulnerability, upgrade all affected Github.com/cilium/cilium dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/cilium/cilium fixed: 1.11.5
Upgrade github.com/cilium/cilium to 1.11.5
github.com/cilium/cilium fixed: 1.10.11
Upgrade github.com/cilium/cilium to 1.10.11
github.com/cilium/cilium fixed: 1.9.16
Upgrade github.com/cilium/cilium to 1.9.16
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/cilium/cilium

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-29178, inspect your project dependencies for Github.com/cilium/cilium:

inspect dependencies for github.com/cilium/cilium

Analyze the terminal output to locate any version of Github.com/cilium/cilium in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-276: Incorrect Default Permissions, where during installation, installed file permissions are set to allow anyone to modify those files. In Github.com/cilium/cilium, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Users with host file system access on a node and the privileges to run as group ID 1000 can gain access to the per node API of Cilium via Unix domain socket on the host where Cilium is running. If a malicious user is able to gain unprivileged access to a user corresponding to this group, then they can leverage this access to compromise the integrity as well as system availability on that host. Operating Systems that have unprivileged users **not** belonging the group ID 1000 are **not** affected by this vulnerability. Best practices for managing the secure deployment of Kubernetes clusters will typically limit the ability for a malicious user to deploy pods with access to this group or to access the host filesystem, and limit user access to the nodes for users belonging to this group. These best practices include (but are not limited to) enforcing Admission Control policies to limit the configuration of Kubernetes Pod [hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) and [SecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) fields. ### Patches Cilium versions >=1.9.16, >=1.10.11, >=1.11.5 mitigate this issue by setting the default group to 0 (root). ### Workarounds Prevent Cilium from running with group 1000 by modifying Cilium's DaemonSet to run with the following command: ```yaml containers: - name: cilium-agent args: - -c - "groupdel cilium && cilium-agent --config-dir=/tmp/cilium/config-map" command: - bash ``` instead of ```yaml containers: - name: cilium-agent args: - --config-dir=/tmp/cilium/config-map command: - cilium-agent ``` ### Acknowledgements The Cilium community has worked together with members of Isovalent and Form 3 to prepare these mitigations. Special thanks to Daniel Iziourov and Daniel Teixeira for their cooperation. ### For more information If you have any questions or comments about this advisory: * Email us at [security@cilium.io](mailto:security@cilium.io)

CVE-2022-29178 Affected Github.com/cilium/cilium Versions

3 component(s)
Fixed Versions:
1.11.51.10.111.9.16
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cilium/cilium
Go
≥ 1.11.0
< 1.11.5
1.11.5
github.com/cilium/cilium
Go
≥ 1.10.0
< 1.10.11
1.10.11
github.com/cilium/cilium
Go
< 1.9.16
1.9.16

References

Frequently Asked Questions

What is CVE-2022-29178?
CVE-2022-29178 is a security vulnerability in Github.com/cilium/cilium involving Access to Unix domain socket can lead to privileges escalation in Cilium under CWE-276: Incorrect Default Permissions.
Which Github.com/cilium/cilium versions are affected?
Affected versions include releases prior to 1.11.5, 1.10.11, 1.9.16 across affected packages: github.com/cilium/cilium.
What version fixes CVE-2022-29178?
Upgrading to 1.11.5, 1.10.11, 1.9.16 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cilium/cilium affected?
Yes, github.com/cilium/cilium is affected in releases prior to 1.11.5, 1.10.11, 1.9.16. Upgrade your dependency to 1.11.5, 1.10.11, 1.9.16 or later.
What is the CVSS score of CVE-2022-29178?
CVE-2022-29178 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2022-29178?
CVE-2022-29178 is classified under CWE-276: Incorrect Default Permissions (During installation, installed file permissions are set to allow anyone to modify those files.).
How can I check Go dependencies for CVE-2022-29178?
Run the dependency tree command: 'inspect dependencies for github.com/cilium/cilium'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6p8v-8cq8-v2r3",
  "modified" : "2022-05-24T21:14:41Z",
  "published" : "2022-05-24T21:14:41Z",
  "aliases" : [ "CVE-2022-29178" ],
  "summary" : "Access to Unix domain socket can lead to privileges escalation in Cilium",
  "details" : "### Impact\n\nUsers with host file system access on a node and the privileges to run as group ID 1000 can gain access to the per node API of Cilium via Unix domain socket on the host where Cilium is running. If a malicious user is able to gain unprivileged access to a user corresponding to this group, then they can leverage this access to compromise the integrity as well as system availability on that host. Operating Systems that have unprivileged users **not** belonging the group ID 1000 are **not** affected by this vulnerability.\n\nBest practices for managing the secure deployment of Kubernetes clusters will typically limit the ability for a malicious user to deploy pods with access to this group or to access the host filesystem, and limit user access to the nodes for users belonging to this group. These best practices include (but are not limited to) enforcing Admission Control policies to limit the configuration of Kubernetes Pod [hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) and [SecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) fields.\n\n### Patches\n\nCilium versions >=1.9.16, >=1.10.11, >=1.11.5 mitigate this issue by setting the default group to 0 (root).\n\n### Workarounds\n\nPrevent Cilium from running with group 1000 by modifying Cilium's DaemonSet to run with the following command:\n\n```yaml\n      containers:\n      - name: cilium-agent\n        args:\n        - -c\n        - \"groupdel cilium && cilium-agent --config-dir=/tmp/cilium/config-map\"\n        command:\n        - bash\n```\ninstead of\n```yaml\n      containers:\n      - name: cilium-agent\n        args:\n        - --config-dir=/tmp/cilium/config-map\n        command:\n        - cilium-agent\n```\n\n### Acknowledgements\n\nThe Cilium community has worked together with members of Isovalent and Form 3 to prepare these mitigations.  Special thanks to Daniel Iziourov and Daniel Teixeira for their cooperation.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [security@cilium.io](mailto:security@cilium.io)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cilium/cilium"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.11.0"
      }, {
        "fixed" : "1.11.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cilium/cilium"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.10.0"
      }, {
        "fixed" : "1.10.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cilium/cilium"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.9.16"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cilium/cilium/security/advisories/GHSA-6p8v-8cq8-v2r3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-29178"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cilium/cilium/releases/tag/v1.10.11"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cilium/cilium/releases/tag/v1.11.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cilium/cilium/releases/tag/v1.9.16"
  }, {
    "type" : "PACKAGE",
    "url" : "github.com/cilium/cilium"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-276" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-05-24T21:14:41Z",
    "nvd_published_at" : "2022-05-20T19:15:00Z"
  }
}