CVE-2023-30851: Github.com/cilium/cilium Potential HTTP Policy Bypass When Vulnerability

MODERATE
Advisory Identifier: GHSA-2h44-x2wx-49f4
CVSS 5.3
CWE-693
Published
Advisory Summary

CVE-2023-30851 is a MODERATE (CVSS 5.3) potential http policy bypass when vulnerability (CWE-693: Protection Mechanism Failure) affecting Github.com/cilium/cilium libraries in the Go ecosystem. The issue involves potential http policy bypass when using header rules in cilium. Remediation is available by upgrading affected packages to version 1.11.16, 1.12.9, 1.13.2.

CVE-2023-30851 at a Glance

CVE Identifier CVE-2023-30851
GHSA Identifier GHSA-2h44-x2wx-49f4
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-693: Protection Mechanism Failure
Affected Product Github.com/cilium/cilium
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

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

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

How to Fix CVE-2023-30851

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.16
Upgrade github.com/cilium/cilium to 1.11.16
github.com/cilium/cilium fixed: 1.12.9
Upgrade github.com/cilium/cilium to 1.12.9
github.com/cilium/cilium fixed: 1.13.2
Upgrade github.com/cilium/cilium to 1.13.2
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-2023-30851, 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.16), 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-693: Protection Mechanism Failure, where the product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. 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 This issue only impacts users who: - Have a HTTP policy that applies to multiple `toEndpoints` AND - Have an allow-all rule in place that affects only one of those endpoints In such cases, a wildcard rule will be appended to the set of HTTP rules, which could cause bypass of HTTP policies. ### Patches This issue has been patched in Cilium 1.11.16, 1.12.9, and 1.13.2. ### Workarounds Rewrite HTTP rules for each endpoint separately. For example, if the initial rule looks like: ``` egress: - toEndpoints: - matchLabels: k8s:kind: echo - matchLabels: k8s:kind: example toPorts: - ports: - port: "8080" protocol: TCP rules: http: - method: "GET" ``` It should be rewritten to: ``` egress: - toEndpoints: - matchLabels: k8s:kind: echo toPorts: - ports: - port: "8080" protocol: TCP rules: http: - method: "GET" - toEndpoints: - matchLabels: k8s:kind: example toPorts: - ports: - port: "8080" protocol: TCP rules: http: - method: "GET" ``` ### Acknowledgements The Cilium community has worked together with members of Isovalent to prepare these mitigations. Special thanks to @jrajahalme for investigating and fixing the issue. ### 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.

CVE-2023-30851 Affected Github.com/cilium/cilium Versions

3 component(s)
Fixed Versions:
1.11.161.12.91.13.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cilium/cilium
Go
< 1.11.16
1.11.16
github.com/cilium/cilium
Go
≥ 1.12.0
< 1.12.9
1.12.9
github.com/cilium/cilium
Go
≥ 1.13.0
< 1.13.2
1.13.2

References

Frequently Asked Questions

What is CVE-2023-30851?
CVE-2023-30851 is a security vulnerability in Github.com/cilium/cilium involving Potential HTTP policy bypass when using header rules in Cilium under CWE-693: Protection Mechanism Failure.
Which Github.com/cilium/cilium versions are affected?
Affected versions include releases prior to 1.11.16, 1.12.9, 1.13.2 across affected packages: github.com/cilium/cilium.
What version fixes CVE-2023-30851?
Upgrading to 1.11.16, 1.12.9, 1.13.2 (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.16, 1.12.9, 1.13.2. Upgrade your dependency to 1.11.16, 1.12.9, 1.13.2 or later.
What is the CVSS score of CVE-2023-30851?
CVE-2023-30851 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2023-30851?
CVE-2023-30851 is classified under CWE-693: Protection Mechanism Failure (The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.).
How can I check Go dependencies for CVE-2023-30851?
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-2h44-x2wx-49f4",
  "modified" : "2023-06-02T23:57:03Z",
  "published" : "2023-05-22T20:33:15Z",
  "aliases" : [ "CVE-2023-30851" ],
  "summary" : "Potential HTTP policy bypass when using header rules in Cilium",
  "details" : "### Impact\n\nThis issue only impacts users who:\n\n- Have a HTTP policy that applies to multiple `toEndpoints` AND\n- Have an allow-all rule in place that affects only one of those endpoints\n\nIn such cases, a wildcard rule will be appended to the set of HTTP rules, which could cause bypass of HTTP policies.\n\n### Patches\n\nThis issue has been patched in Cilium 1.11.16, 1.12.9, and 1.13.2.\n\n### Workarounds\n\nRewrite HTTP rules for each endpoint separately. For example, if the initial rule looks like:\n\n```\n  egress:\n    - toEndpoints:\n        - matchLabels:\n            k8s:kind: echo\n        - matchLabels:\n            k8s:kind: example\n      toPorts:\n        - ports:\n            - port: \"8080\"\n              protocol: TCP\n          rules:\n            http:\n              - method: \"GET\"\n```\n\nIt should be rewritten to:\n \n```\n  egress:\n    - toEndpoints:\n        - matchLabels:\n            k8s:kind: echo\n      toPorts:\n        - ports:\n            - port: \"8080\"\n              protocol: TCP\n          rules:\n            http:\n              - method: \"GET\"\n    - toEndpoints:\n        - matchLabels:\n            k8s:kind: example\n      toPorts:\n        - ports:\n            - port: \"8080\"\n              protocol: TCP\n          rules:\n            http:\n              - method: \"GET\"\n```     \n\n### Acknowledgements\n\nThe Cilium community has worked together with members of Isovalent to prepare these mitigations. Special thanks to @jrajahalme for investigating and fixing the issue.\n\n### For more information\n\nIf you have any questions or comments about this advisory, please reach out on [Slack](https://docs.cilium.io/en/latest/community/community/#slack).\n\nAs 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.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cilium/cilium"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.11.16"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cilium/cilium"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.12.0"
      }, {
        "fixed" : "1.12.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cilium/cilium"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.13.0"
      }, {
        "fixed" : "1.13.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cilium/cilium/security/advisories/GHSA-2h44-x2wx-49f4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-30851"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cilium/cilium"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cilium/cilium/releases/tag/v1.11.16"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cilium/cilium/releases/tag/v1.12.9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cilium/cilium/releases/tag/v1.13.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-693" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-22T20:33:15Z",
    "nvd_published_at" : "2023-05-25T18:15:10Z"
  }
}