Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1tY2c2LWgzNjItY21xNc0yIQ

Improper Authorization in cobbler

Impact

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

The same applies to user accounts with passwords set to be expired.

Patches

There is a patch for the latest Cobbler 3.3.2 available, however a backport will be done for 3.2.x.

Workarounds

References

How to test if my Cobbler instance is affected?

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

def test_pam_login_with_expired_user():
    # Arrange
    # create pam testuser
    test_username = "expired_user"
    test_password = "password"
    test_api = CobblerAPI()
    subprocess_1 = subprocess.run(
        ["perl", "-e", "'print crypt(\"%s\", \"%s\")'" % (test_username, test_password)],
        stdout=subprocess.PIPE
    )
    subprocess.run(["useradd", "-p", subprocess_1.stdout, test_username])
    # change user to be expired
    subprocess.run(["chage", "-E0", test_username])

    # Act
    result = pam.authenticate(test_api, test_username, test_password)

    # Assert - login should fail
    assert not result

For more information

If you have any questions or comments about this advisory:

Permalink: https://github.com/advisories/GHSA-mcg6-h362-cmq5
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1tY2c2LWgzNjItY21xNc0yIQ
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: about 2 years ago
Updated: over 1 year ago


CVSS Score: 8.2
CVSS vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

Identifiers: GHSA-mcg6-h362-cmq5, CVE-2022-0860
References: Repository: https://github.com/cobbler/cobbler
Blast Radius: 8.5

Affected Packages

pypi:cobbler
Dependent packages: 0
Dependent repositories: 11
Downloads: 292 last month
Affected Version Ranges: < 3.3.2
Fixed in: 3.3.2
All affected versions: 3.1.2, 3.2.1, 3.2.2, 3.3.0, 3.3.1
All unaffected versions: 3.3.2, 3.3.3, 3.3.4