T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- scripts/repair_chrome_gemini.py:133
- Finding
- Chrome Gemini Regional and Eligibility Controls Can Be Overridden<![CDATA[ ## Vulnerability Details **File Location**: `scripts/repair_chrome_gemini.py`, lines 133–169 **Vulnerability Type**: Regional and feature-eligibility control bypass **Risk Level**: Medium ### Vulnerable Code ```python if data.get("variations_country") != "us": changes.append(f"variations_country: {data.get('variations_country')!r} -> 'us'") data["variations_country"] = "us" current_perm = data.get("variations_permanent_consistency_country") updated_perm = normalize_country_list(current_perm, "us") if updated_perm != current_perm: changes.append( "variations_permanent_consistency_country: " f"{current_perm!r} -> {updated_perm!r}" ) data["variations_permanent_consistency_country"] = updated_perm for key in ( "variations_safe_seed_permanent_consistency_country", "variations_safe_seed_session_consistency_country", ): if data.get(key) != "us": changes.append(f"{key}: {data.get(key)!r} -> 'us'") data[key] = "us" glic = data.get("glic") if not isinstance(glic, dict): changes.append("glic: created missing object") glic = {} data["glic"] = glic if glic.get("is_glic_eligible") is not True: changes.append(f"glic.is_glic_eligible: {glic.get('is_glic_eligible')!r} -> True") glic["is_glic_eligible"] = True browser = data.get("browser") if not isinstance(browser, dict): changes.append("browser.enabled_labs_experiments: created missing object") browser = {} data["browser"] = browser experiments = ensure_list(browser.get("enabled_labs_experiments")) added = [] for entry in ("glic@1", "glic-side-panel@1"): if entry not in experiments: experiments.append(entry) added.append(entry) ``` ### Technical Analysis The script directly rewrites Chrome's locally stored country and feature-eligibility state. It changes multiple variation-country properties to `us`, sets `glic.is_glic_eligible` to `True`, and adds the Glic experiments to the enabled experime ...[truncated 2390 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the automatic rewriting of all variation-country and Glic eligibility fields. 2. Use official Chrome configuration interfaces and documented feature-availability mechanisms rather than altering internal eligibility state. 3. Restrict repair behavior to restoring valid user preferences without representing the user as being in a different country. 4. If the override capability must remain for testing or diagnostics: - Require an explicit option such as `--override-eligibility`. - Display a clear warning that the operation changes internal regional and eligibility controls. - Require interactive confirmation unless a separately named noninteractive testing option is supplied. - Limit the operation to disposable test profiles rather than the user's primary profile. - Record the original values in a structured restoration manifest. - Provide a dedicated rollback command that verifies and restores the exact original values. 5. Detect managed Chrome installations before writing and refuse modification when enterprise policies govern the relevant settings. 6. Validate that the requested user-data directory belongs to the expected current-user profile and reject symbolic-link or unexpected-file targets before replacement. 7. Preserve `--dry-run` as the default recommended mode and show every affected eligibility field before accepting a write. ]]>
