GHSA-fp27-88fp-2phg: Medium severity pip/glances vulnerability

Published Aug 17, 2026
·
Updated

Summary Glances's REST API server includes a documented safety check intended to guarantee that corscredentials=True can never be combined with an unrestricted CORS origin allowlist. The check compares the configured origin list to the wildcard using exact list equality (corsorigins == [""]) instead of a membership test. Any multi-entry origin configuration that merely includes "" alongside other origins (e.g. corsorigins=,https://trusted.example.com) bypasses the check entirely, while Starlette's underlying CORSMiddleware still treats the presence of "" anywhere in the list as "allow all origins" and reflects the request's actual Origin header together with Access-Control-Allow-Credentials: true. This allows any website to read a victim's authenticated Glances monitoring data — including full process lists with command-line arguments — by exploiting the browser's automatic replay of cached HTTP Basic Auth credentials in a cross-origin request.

Details glances/outputs/glancesrestfulapi.py:298: python if corsorigins == [""] and corscredentials: logger.warning(...) corscredentials = False The intended guarantee is documented in glances/outputs/glancesstdoutapirestfuldoc.py:247-260: "Setting corscredentials=True with corsorigins= is not allowed. Glances will automatically disable credentials and log a warning if this combination is detected." The exact-equality comparison only matches when corsorigins is precisely the single-element list [""]. Starlette's CORSMiddleware, by contrast, determines wildcard behavior via "" in alloworigins — a membership test — so any multi-entry list containing "" is still treated by Starlette as "allow all origins," while Glances's own guard silently fails to disable credentials for that case, breaking the documented guarantee with no warning logged.

This is the same exact-match-versus-membership-test bug shape that CVE-2026-46608 fixed in the sibling XML-RPC server (glances/server.py, which correctly performs if '' in corsorigins:). The REST API's analogous check was never updated to the corrected pattern.

PoC Configuration: ini [outputs] corsorigins=,https://trusted.example.com corscredentials=true Confirm auth is required curl -s -i http://127.0.0.1:36212/api/4/cpu -> 401 Unauthorized, www-authenticate: Basic

Authenticated request, Origin header set to an arbitrary domain never configured curl -s -i -u glances:<password> -H "Origin: https://totally-evil-attacker.com" \ http://127.0.0.1:36212/api/4/cpu -> 200 OK access-control-allow-origin: https://totally-evil-attacker.com access-control-allow-credentials: true {"total": 0.0, "user": 0.0, ...}

Same against the process list, exposing command lines/usernames/PIDs curl -s -u glances:<password> -H "Origin: https://totally-evil-attacker.com" \ http://127.0.0.1:36212/api/4/processlist -> [{"cmdline": [...], "username": "...", "pid": ..., ...}, ...] (same access-control-allow-origin / access-control-allow-credentials headers)

Impact Any operator who configures corsorigins as a multi-entry list that includes the wildcard alongside one or more specific trusted origins — a plausible configuration mistake given the documented default is the bare wildcard, and an operator attempting to additionally permit a second legitimate dashboard origin may not realize the wildcard must first be removed — silently loses the documented credentials-disable protection. Any third-party website can then read the full authenticated monitoring dataset of any visitor who has previously logged into that Glances instance via their browser, including process command-line arguments (which frequently contain secrets passed as CLI flags), usernames, and PIDs.

Remediation suggestion Change the check at glancesrestfulapi.py:298 from corsorigins == [""] to "" in corsorigins, matching the corrected pattern already used in glances/server.py for the XML-RPC server.

Affected Software

1 affected componentFixes available
pip/glances<4.5.6
4.5.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/glances to a version that resolves this vulnerability.

    Fixed in 4.5.6
  2. Configuration

    Change the configuration so cors_origins does not include "*" when cors_credentials is enabled; avoid configs like `cors_origins=*,https://trusted.example.com`.

    Glances REST API (glances_restful_api.py) cors_origins = Remove the wildcard "*" when configuring cors_credentials=True (do not use a multi-entry list that contains "*")
  3. Configuration

    Update the credentials-unrestricted CORS safety check at `glances_restful_api.py:298` from `cors_origins == ["*"]` to `"*" in cors_origins`, matching the corrected pattern already used in `glances/server.py` for the XML-RPC server. This ensures credentials are disabled and the warning is logged when the wildcard is present.

    Glances REST API (glances_restful_api.py:298) cors_origins check = membership test: "*" in cors_origins

Event History

Aug 17, 2026
Advisory Published
via GitHub·05:04 PM
Data Sourced
via GitHub·05:04 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-fp27-88fp-2phg?

The severity of GHSA-fp27-88fp-2phg is rated as medium with a score of 6.5.

2

How do I fix GHSA-fp27-88fp-2phg?

To fix GHSA-fp27-88fp-2phg, ensure that `cors_credentials=True` is not combined with an unrestricted CORS origin allowlist.

3

What is the risk level associated with GHSA-fp27-88fp-2phg?

GHSA-fp27-88fp-2phg carries a risk level of 37.

4

What software is affected by GHSA-fp27-88fp-2phg?

The affected software for GHSA-fp27-88fp-2phg is Glances, managed through pip.

5

When was GHSA-fp27-88fp-2phg published?

GHSA-fp27-88fp-2phg was published on August 17, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203