CVE-2022-0860: Cobbler Improper Authorization Vulnerability
MODERATECVE-2022-0860 is a MODERATE (CVSS 8.2) improper authorization vulnerability (CWE-285: Improper Authorization) affecting Cobbler libraries in the PyPI ecosystem. The issue involves improper authorization in cobbler. Remediation is available by upgrading affected packages to version 3.3.2.
CVE-2022-0860 at a Glance
Security Impact
CVSS: 8.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N).
How to Fix CVE-2022-0860
To remediate this vulnerability, upgrade all affected Cobbler dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install cobbler>=3.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show cobbler
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-0860, inspect your installed packages using pip:
pip show cobbler
Analyze the terminal output to locate any version of Cobbler in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.2), your application is affected.
Note: The pip show cobbler command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Cobbler, 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-0860 Affected Cobbler Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cobbler
|
PyPI |
< 3.3.2
|
3.3.2
|
References
Frequently Asked Questions
What is CVE-2022-0860?
Which Cobbler versions are affected?
What version fixes CVE-2022-0860?
Is cobbler affected?
What is the CVSS score of CVE-2022-0860?
What CWE is associated with CVE-2022-0860?
How can I check PyPI dependencies for CVE-2022-0860?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mcg6-h362-cmq5",
"modified" : "2024-11-18T16:26:19Z",
"published" : "2022-03-11T20:52:04Z",
"aliases" : [ "CVE-2022-0860" ],
"summary" : "Improper Authorization in cobbler",
"details" : "### Impact\n\nIf PAM is correctly configured and a user account is set to expired, the expired user-account is still able to successfully log into Cobbler in all places (Web UI, CLI & XMLRPC-API).\n\nThe same applies to user accounts with passwords set to be expired.\n\n### Patches\n\nThere is a patch for the latest Cobbler `3.3.2` available, however a backport will be done for `3.2.x`.\n\n### Workarounds\n\n- Delete expired accounts which are able to access Cobbler via PAM.\n- Use `chage -l <username>` to lock the account. If the account has SSH-Keys attached then remove them completely.\n\n### References\n\n- Originally discovered by @ysf at https://www.huntr.dev/bounties/c458b868-63df-414e-af10-47e3745caa1d/\n\n### How to test if my Cobbler instance is affected?\n\nThe following `pytest` test assumes that your PAM setup is correct. In case the added user is not able to login, this test does not make sense to be executed.\n\n```python\ndef test_pam_login_with_expired_user():\n # Arrange\n # create pam testuser\n test_username = \"expired_user\"\n test_password = \"password\"\n test_api = CobblerAPI()\n subprocess_1 = subprocess.run(\n [\"perl\", \"-e\", \"'print crypt(\\\"%s\\\", \\\"%s\\\")'\" % (test_username, test_password)],\n stdout=subprocess.PIPE\n )\n subprocess.run([\"useradd\", \"-p\", subprocess_1.stdout, test_username])\n # change user to be expired\n subprocess.run([\"chage\", \"-E0\", test_username])\n\n # Act\n result = pam.authenticate(test_api, test_username, test_password)\n\n # Assert - login should fail\n assert not result\n```\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the Cobbler repository](https://github.com/cobbler/cobbler/issues/new/choose)\n* Ask in the [Gitter/Matrix Chat](https://gitter.im/cobbler/community)\n* Email us at [cobbler.project@gmail.com](mailto:cobbler.project@gmail.com)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "cobbler"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cobbler/cobbler/security/advisories/GHSA-mcg6-h362-cmq5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-0860"
}, {
"type" : "WEB",
"url" : "https://github.com/cobbler/cobbler/commit/9044aa990a94752fa5bd5a24051adde099280bfa"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-mcg6-h362-cmq5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cobbler/cobbler"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/cobbler/PYSEC-2022-177.yaml"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/c458b868-63df-414e-af10-47e3745caa1d"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/D4KCNZYBQC2FM5SEEDRQZO4LRZ4ZECMG"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DYWYHWVVRUSPCV5SWBOSAMQJQLTSBTKY"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IYSHMF6MEIITFAG7EJ3IQKVUN7MDV2XM"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-285", "CWE-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-11T20:52:04Z",
"nvd_published_at" : "2022-03-11T13:15:00Z"
}
}