T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/lib.py:547- Finding
Channel Configuration Opens Hermes Gateway to All Messaging-Platform Users
- Content
View full analysis
Vulnerability Details
File Location:
scripts/lib.py:547-557
Vulnerability Type: Insecure access-control configuration
Risk Level: Highsh if [ "$BOT_PLATFORM" = "feishu" ]; then echo "Configuring Feishu channel..." set_env_variable "$ENV_PATH" "FEISHU_APP_ID" "$FEISHU_APP_ID" set_env_variable "$ENV_PATH" "FEISHU_APP_SECRET" "$FEISHU_APP_SECRET" set_env_variable "$ENV_PATH" "FEISHU_DOMAIN" "feishu" set_env_variable "$ENV_PATH" "FEISHU_CONNECTION_MODE" "websocket" set_env_variable "$ENV_PATH" "FEISHU_ALLOW_ALL_USERS" "true" set_env_variable "$ENV_PATH" "FEISHU_ALLOWED_USERS" "" set_env_variable "$ENV_PATH" "FEISHU_GROUP_POLICY" "open" set_env_variable "$ENV_PATH" "GATEWAY_ALLOW_ALL_USERS" "true" echo "✅ Feishu configuration written successfully" elif [ "$BOT_PLATFORM" = "wecom" ]; then echo "Configuring WeCom channel..." set_env_variable "$ENV_PATH" "WECOM_BOT_ID" "$WECOM_BOT_ID" set_env_variable "$ENV_PATH" "WECOM_SECRET" "$WECOM_SECRET" set_env_variable "$ENV_PATH" "GATEWAY_ALLOW_ALL_USERS" "true"Technical Analysis
The remote channel-installation script explicitly enables unrestricted gateway access for both supported platforms. The Feishu branch additionally clears the user allowlist and configures an open group policy.
These settings are applied automatically whenever
install_channel_remote()creates and executes the channel configuration script. The confirmation atscripts/channels.py:134-138only asks the user to confirm the general configuration; it does not disclose that the gateway will accept all users or provide an option to configure an allowlist.This behavior crosses an authorization boundary because configuring a bot integration does not inherently authorize every messaging-platform user to access the deployed agent. The generated configuration expands access beyond the bot credentials and target platform selected by the operator.
Attack Path
- The ...[truncated 1089 chars]
- Remediation
View remediation
Remediation Suggestions
- Default all channel and gateway access controls to deny:
FEISHU_ALLOW_ALL_USERS=falseGATEWAY_ALLOW_ALL_USERS=false- A restrictive group policy
- Require an explicit user or group allowlist during channel configuration.
- Add dedicated CLI options such as
--allowed-userand--allowed-group. - If unrestricted access is required, expose it through an explicit option such as
--allow-all-users; do not enable it implicitly. - Display the resulting authorization policy before confirmation.
- Require a separate confirmation for unrestricted access, including in automated workflows through an explicit flag.
- Validate the effective gateway policy after writing the configuration and fail closed if no allowlist is present.
- Default all channel and gateway access controls to deny:
