CVE-2026-68520
## Summary Glances provides `as_dict_secure()` explicitly designed for unauthenticated API access, with a docstring stating it returns "a sanitised copy of the configuration dict" where "Sensitive keys in remaining sections are replaced by '********'". However, the implementation only checks KEY names against a regex pattern and never inspects VALUE content. The documented `[ip]` config section supports `public_api` (URL), `public_username` (login), and `public_password` (password). While `public_password` is correctly masked, both `public_api` (when containing embedded credentials like `https://user:pass@host/`) and `public_username` are returned in full to unauthenticated users via `GET /api/4/config`. ## Affected Versions Glances latest (Docker: `nicolargo/glances:latest`) ## Root Cause In `glances/config.py`, `as_dict_secure()`: ```python _SECURE_SENSITIVE_KEY_RE = re.compile(r"password|token|secret|api_key|apikey|ssl_keyfile", re.IGNORECASE) def as_dict_secure(self): """Return a sanitised copy of the configuration dict. Intended for unauthenticated API access. - Sensitive keys in remaining sections are replaced by '********'. """ sanitized = {} for section, options in self.as_dict().items(): if section in _SECURE_BLOCKED_SECTIONS: continue sanitized[section] = { key: "********" if _SECURE_SENSITIVE_KEY_RE.search(key) else value for key, value in options.items() } return sanitized ``` In `glances/outputs/glances_restful_api.py`: ```python # Line 1294 args_json = self.config.as_dict() if self.args.password else self.config.as_dict_secure() ``` The `[ip]` config section documents: `public_api` (URL), `public_username` (login), `public_password` (password). - `public_password` → matches "password" → masked ✓ - `public_api` → no match → returned in full (contains `user:pass@` in URL) ✗ - `public_username` → no match → returned in full ✗ ## Impact - Unauthenticated credential disclo
Properties
- severity
- medium
- summary
- Glances: as_dict_secure() Value-Level Bypass Leaks Credentials in URL Values via /api/4/config
- epss_score
- 0.00237
- cvss_score
- 5.3
- ghsa_published
- 2026-08-17T17:20:48Z
- source_url
- https://github.com/advisories/GHSA-4h34-v6r8-mmjc
- ghsa_updated
- 2026-08-17T17:20:50Z
- ghsa_id
- GHSA-4h34-v6r8-mmjc
- cve_id
- CVE-2026-68520
- cvss_vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- is_ghsa_only
- false
- epss_percentile
- 0.14889
Related Entities (5)
ENRICHED_BY (1)
VULNERABLE_TO (1)
AFFECTS (1)
HAS_WEAKNESS (1)
REPORTED_BY (1)
Explore deeper with Ninja Signal's threat intelligence graph