GHSA-2h44-x2wx-49f4

Suggest an improvement
Source
https://github.com/advisories/GHSA-2h44-x2wx-49f4
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/05/GHSA-2h44-x2wx-49f4/GHSA-2h44-x2wx-49f4.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-2h44-x2wx-49f4
Aliases
Related
Published
2023-05-22T20:33:15Z
Modified
2024-09-11T06:13:44.893375Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
Potential HTTP policy bypass when using header rules in Cilium
Details

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.

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 - 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.

Database specific
{
    "nvd_published_at": "2023-05-25T18:15:10Z",
    "cwe_ids": [
        "CWE-693"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2023-05-22T20:33:15Z"
}
References

Affected packages

Go / github.com/cilium/cilium

Package

Name
github.com/cilium/cilium
View open source insights on deps.dev
Purl
pkg:golang/github.com/cilium/cilium

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.11.16

Go / github.com/cilium/cilium

Package

Name
github.com/cilium/cilium
View open source insights on deps.dev
Purl
pkg:golang/github.com/cilium/cilium

Affected ranges

Type
SEMVER
Events
Introduced
1.12.0
Fixed
1.12.9

Go / github.com/cilium/cilium

Package

Name
github.com/cilium/cilium
View open source insights on deps.dev
Purl
pkg:golang/github.com/cilium/cilium

Affected ranges

Type
SEMVER
Events
Introduced
1.13.0
Fixed
1.13.2