T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/apply_feishu_group_company.py:33- Finding
Undisclosed Access-Policy Relaxation
- Content
View full analysis
Vulnerability Details
File Location:
scripts/apply_feishu_group_company.py, lines 33 and 47
Vulnerability Type: Unauthorized access and privilege escalation
Risk Level: MediumVulnerable Code
python top_group['requireMention'] = True top_group['groupPolicy'] = 'open'The same policy is also applied to every patched account:
python entry['requireMention'] = require_mention entry['groupPolicy'] = 'open'Technical Analysis
The script unconditionally assigns
groupPolicythe valueopenat both the top-level group configuration and each patched account's group configuration. Existing restrictive policy values are overwritten without operator confirmation.The documented purpose of the skill is to configure mention-based routing among a coordinator and specialist bots. The access-policy relaxation is not identified among the changes documented in
SKILL.md, and it is not inherently necessary merely to setrequireMention. Consequently, running the script against an existing restricted deployment can silently broaden access beyond the task's stated routing objective.The effective severity depends on OpenClaw's precise
groupPolicysemantics and any external Feishu controls. Nevertheless, forcibly replacing an existing restrictive policy withopenviolates least privilege and creates a credible access-control risk.Attack Path
- An OpenClaw deployment has a Feishu group configured with a restrictive group policy.
- An administrator runs this skill's script to establish the documented coordinator and specialist mention-routing behavior.
- During patching, the script overwrites the top-level group policy and all selected accounts' per-group policies with
open. - The modified configuration is written to
openclaw.json. - After the configuration is loaded, group participants who were not authorized under the former restrictive policy may be able to invoke the ...[truncated 966 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not change
groupPolicyas part of the default mention-routing operation. - Preserve existing policy values when present:
python top_group['requireMention'] = True entry['requireMention'] = require_mention - If policy initialization is necessary, use a restrictive default only when the key is absent rather than overwriting an existing value.
- Add an explicit option such as
--group-policyfor operators who intentionally want to change access policy. Validate it against a strict allowlist of supported values. - Require an explicit confirmation flag before accepting
open, particularly for non-interactive use. - Display old and new access-policy values during dry runs and before writing the configuration.
- Document the policy change and its security implications in
SKILL.md. - Validate the resulting configuration with an unauthorized test account to ensure that mention routing does not unintentionally bypass group access restrictions.
- Do not change
