The vulnerability exists in the set_config_value function within src/pyload/core/api/__init__.py. This function is responsible for handling configuration changes. It attempts to protect sensitive settings by checking them against a predefined set called ADMIN_ONLY_CORE_OPTIONS. However, the set contained incorrect names for the SSL certificate and key file settings (ssl_cert and ssl_key instead of the correct ssl_certfile and ssl_keyfile). Additionally, the ssl_certchain setting was missing entirely from this protected set. Consequently, when a non-admin user with the necessary 'SETTINGS' permission sends a request to change these SSL settings, the authorization check fails to recognize them as admin-only, permitting the unauthorized modification. This allows an attacker to point the web server to malicious SSL certificate and key files, enabling them to intercept and decrypt all HTTPS traffic, including administrator credentials.