T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/mapping-api.js:79- Finding
Unauthenticated User Registration Allows Identity Mapping Takeover
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its Feishu relay purpose, but its user identity mapping can be spoofed or overwritten and it persists sensitive routing identifiers with weak controls.
Review before installing. Use only in a tightly controlled internal or personal Feishu workspace, restrict bot visibility to intended users, do not rely on manual User ID entry for real identity, lock single-user mode to a verified owner open_id, protect user-mapping.json with restrictive permissions, and add authentication, audit logging, and safer storage before production use.
scripts/mapping-api.js:79Unauthenticated User Registration Allows Identity Mapping Takeover
references/single-user-setup.md:111Single-User Mode Permits Owner Mapping Replacement by Any Reachable User
references/single-user-setup.md:413Sensitive Identity Mapping Is Stored with World-Readable Permissions
scripts/mapping-api.js:27Non-Atomic Read-Modify-Write Operations Can Corrupt or Lose Identity Mappings
references/feishu-bot-setup.md:190Unpinned Global Installation of a Third-Party Package Creates Supply-Chain Risk
Referenced artifact was not completely inspected
- `relay-examples.md` - Code examples
Instructions found that direct the agent to transmit conversation context or user data to external services.
Get user's open_id for a specific Bot.
Use case: Specialist wants to send message to user.
const openId = await mapping.getBotOpenId('user_demo_001', 'product-expert');
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
In your Agent workspace, create .env file:
# /path/to/workspace-coordinator/.env
DEPLOYMENT_MODE=single-user
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
In your Agent workspace, create .env file:
# /path/to/workspace-coordinator/.env
DEPLOYMENT_MODE=single-user
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
In your Agent workspace, create .env file:
# /path/to/workspace-coordinator/.env
DEPLOYMENT_MODE=single-user
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
In your Agent workspace, create .env file:
# /path/to/workspace-coordinator/.env
DEPLOYMENT_MODE=single-user
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
In your Agent workspace, create .env file:
# /path/to/workspace-coordinator/.env
DEPLOYMENT_MODE=single-user
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
In your Agent workspace, create .env file:
# /path/to/workspace-coordinator/.env
DEPLOYMENT_MODE=single-user
The README explicitly states that multi-user mode relies on manual User ID entry with no verification, which creates an insecure identity-binding mechanism. In a bot relay system that enables cross-bot routing and proactive messaging, an attacker could register another user's ID or impersonate identities, leading to unauthorized message access, spoofed communications, and privacy breaches across agents.
### Limitations
- Manual User ID entry in multi-user mode (no verification)
- Requires multiple Feishu Bot applications
- Internal/enterprise use only
The skill repeatedly instructs users and bots to communicate in Chinese (for example, registration flows use only Chinese prompts) and does not state that this skill is limited to a Chinese-speaking or Feishu-specific locale. Because no opt-in, language selection, or justification is provided, this creates a natural-language locale policy concern.
The skill explicitly documents a registration flow that accepts a user-supplied User ID with no verification, enabling impersonation of other users. In a multi-bot relay architecture, a spoofed identity can cause messages, tasks, and potentially sensitive responses to be routed under the wrong user identity across agents.
User → Bot: "你好"
Bot → User: "请告诉我您的 User ID(工号/用户名)"
User → Bot: "我的 user ID 是:user_demo_001" ← ⚠️ MANUAL STEP - NO VERIFICATION
⚠️ Risks:
This section repeats and operationalizes the insecure design: users provide arbitrary IDs and the system trusts them. Because the mapping is later used for coordinator-to-specialist relay and proactive DMs, an attacker can register as another person and receive or influence communications intended for that victim.
User → Bot: "我的 user ID 是:zhangsan"
**⚠️ Security Warning:** Manual User ID entry has NO verification. Internal use only!
📖 **Full guide:** [references/feishu-bot-setup.md](references/feishu-bot-setup.md)
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
**Don't use for:**
- ❌ Single-Bot scenarios
- ❌ Production without verification (multi-user)
- ❌ External-facing applications
---
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
**Don't use for:**
- ❌ Single-Bot scenarios
- ❌ Production without verification (multi-user)
- ❌ External-facing applications
---
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
### Multi-User Mode ⚠️
- Manual ID entry (no verification)
- Identity spoofing possible
- **Internal use only**
- **Add verification for production**
The setup hard-codes Chinese app names, descriptions, bot bios, and later conversational examples and SOUL instructions in Chinese, implying the deployed skill will operate in that language by default. The document does not offer users or deployers a language/locale choice or explain that the locale restriction is required for a region-specific use case.
The guide explicitly instructs operators to collect user-provided User IDs and store per-bot open_id mappings in a shared JSON file, but it does not require notice, consent, minimization, retention limits, or access controls as part of the registration flow. Because these identifiers enable cross-bot correlation of individual users, misuse, overexposure, or unauthorized access could leak internal identity relationships and create privacy/compliance risk.
This is a markdown file, so SQP-2 applies to omissions in warnings about behaviors affecting user data or privacy. The API reference explicitly exposes a function to list all users and earlier sections document storage of names, IDs, bot-specific open_ids, and activity metadata, but the document provides no warning or privacy notice about access sensitivity or appropriate handling.
The example hard-codes the date format to 'zh-CN', which imposes a specific locale in user-facing output. The file does not indicate that the user can choose a language or that the locale restriction is required for a documented regional purpose.
The guide instructs automatic registration on first contact and storage of bot-specific identifiers in a mapping table without clearly warning users that their identifiers will be persisted. In contexts where others may message the bot, this can lead to silent collection and retention of identifiers without informed consent or clear operator awareness.
The document defines agent names in Chinese and later demonstrates interaction entirely in Chinese, such as the required contact and relay phrases. This creates a natural-language locale constraint for use of the skill, but the guide does not state that Chinese is optional or provide an alternative language path.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
ls -la /path/to/workspace/user-mapping.json
# Should be writable
chmod 644 /path/to/workspace/user-mapping.json
# Check mapping API path
cat /path/to/workspace/mapping-api.js | grep MAPPING_FILE
The guide explicitly claims there is no identity spoofing risk, but the documented logic auto-binds the hardcoded user identity "me" to whichever account contacts the bot first and even updates that binding if the open_id changes later. This creates an authorization flaw: any unintended or unauthorized first contact, or any later message from a different account, can seize the single-user identity and receive relayed bot output.
This code writes user mapping data to user-mapping.json, which affects persisted user data. Although there is an internal comment, there is no confirmation prompt, logging/print statement, or other user-facing disclosure that the skill will modify stored mapping records.
The natural-language documentation and usage guidance in this file are presented exclusively in Chinese. Under the stated policy, forcing a specific language without offering user choice or documenting a justified locale constraint can be a policy violation.
No suspicious patterns detected.