CVE-2022-46167: Github.com/clastix/capsule Capsule Vulnerable To Privilege Escalation Vulnerability
HIGHCVE-2022-46167 is a HIGH (CVSS 8.8) capsule vulnerable to privilege escalation vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/clastix/capsule libraries in the Go ecosystem. The issue involves capsule vulnerable to privilege escalation by serviceaccount deployed in a tenant namespace. Remediation is available by upgrading affected packages to version 0.1.3.
CVE-2022-46167 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-46167
To remediate this vulnerability, upgrade all affected Github.com/clastix/capsule dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/clastix/capsule to 0.1.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/clastix/capsule
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-46167, inspect your project dependencies for Github.com/clastix/capsule:
inspect dependencies for github.com/clastix/capsule
Analyze the terminal output to locate any version of Github.com/clastix/capsule in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.3), 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Github.com/clastix/capsule, 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
CVE-2022-46167 Affected Github.com/clastix/capsule Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/clastix/capsule
|
Go |
< 0.1.3
|
0.1.3
|
References
Frequently Asked Questions
What is CVE-2022-46167?
Which Github.com/clastix/capsule versions are affected?
What version fixes CVE-2022-46167?
Is github.com/clastix/capsule affected?
What is the CVSS score of CVE-2022-46167?
What CWE is associated with CVE-2022-46167?
How can I check Go dependencies for CVE-2022-46167?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x45c-cvp8-q4fm",
"modified" : "2022-12-06T16:20:39Z",
"published" : "2022-12-05T23:08:37Z",
"aliases" : [ "CVE-2022-46167" ],
"summary" : "Capsule vulnerable to privilege escalation by ServiceAccount deployed in a Tenant Namespace",
"details" : "Capsule implements a multi-tenant and policy-based environment in a Kubernetes cluster. A ServiceAccount deployed in a Tenant Namespace, when granted with `PATCH` capabilities on its own Namespace, is able to edit it and remove the Owner Reference, breaking the reconciliation of the Capsule Operator and removing all the enforcement like Pod Security annotations, Network Policies, Limit Range and Resource Quota items.\n\nWith that said, an attacker could detach the Namespace from a Tenant that is forbidding starting privileged Pods using the Pod Security labels by removing the OwnerReference, removing the enforcement labels, and being able to start privileged containers that would be able to start a generic Kubernetes privilege escalation.\n\n### Patches\n\nPatches have been released for version 0.1.3 and all users must upgrade to this release.\n\n### Workarounds\n\nN.A.\n\n### References\n\nN.A.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [github.com/clastix/capsule](https://github.com/clastix/capsule)\n* Reach out on [#capsule](https://kubernetes.slack.com/archives/C03GETTJQRL) channel available on Kubernetes Slack workspace\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/clastix/capsule"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.1.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/clastix/capsule/security/advisories/GHSA-x45c-cvp8-q4fm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-46167"
}, {
"type" : "WEB",
"url" : "https://github.com/clastix/capsule/commit/1df430e71be8c4778c82eca3459978ad7d0b4b7b"
}, {
"type" : "WEB",
"url" : "https://github.com/clastix/capsule/commit/75525ac19254b0c5111e34d7985e2be7bc8b1ac1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/clastix/capsule"
}, {
"type" : "WEB",
"url" : "https://github.com/clastix/capsule/releases/tag/v0.1.3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-12-05T23:08:37Z",
"nvd_published_at" : "2022-12-02T19:15:00Z"
}
}