The vulnerability, CVE-2026-34839, is a Cross-Origin Information Disclosure in Glances caused by a permissive CORS policy on its unauthenticated REST API. This allows any website to access sensitive system information from a user running Glances in web mode.
The analysis of the provided patch fdfb977b1d91b5e410bc06c4e19f8bedb0005ce9 pinpoints the vulnerable area of the codebase. The patch modifies the _router method within the GlancesRestfulApi class in glances/outputs/glances_restful_api.py. This function is responsible for setting up the web server's routing and middleware.
The patch introduces a warning when the server is run without a password and with the default permissive CORS setting (cors_origins = ["*"]). This indicates that the _router function is where the application's security posture regarding CORS is determined. The vulnerability is not a flaw in a specific data-processing function but rather a configuration issue established during the server's initialization, which is handled by _router. Therefore, GlancesRestfulApi._router is the key function that would be involved in the setup of the vulnerable state, making it a critical indicator for this vulnerability.