T05 · Unauthorized Access and Privilege Escalation
- Location
server.py:348- Finding
Unauthenticated API Allows Cross-User Account Impersonation and State Modification
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a disclosed virtual pet Mini App, but its public backend can let unauthenticated users modify or access other users' pet data and potentially escape intended storage paths.
Review carefully before installing or exposing this skill publicly. It should not be run on a public tunnel until Telegram initData validation, user ID validation, path containment, output escaping, CORS restrictions, and data retention controls are added.
server.py:348Unauthenticated API Allows Cross-User Account Impersonation and State Modification
server.py:113Path Traversal Through User Identifiers Enables Arbitrary JSON File Access
index.html:572Stored Cross-Site Scripting Through Pet Names, Dialogues, and User IDs
server.py:241Unescaped Pet Names Permit Active Content Injection in SVG Card Fallback
package.json:10Non-Reproducible Dependency Installation Without a Lockfile
The markdown describes a full HTTP service with mutable POST endpoints, on-disk per-user storage, social interactions, and generated media, while the advertised skill purpose is only to return a Telegram deep link. In context, that concealment is more dangerous because the setup also recommends exposing the service publicly, which could let an under-reviewed backend process untrusted requests.
The markdown describes a full HTTP service with mutable POST endpoints, on-disk per-user storage, social interactions, and generated media, while the advertised skill purpose is only to return a Telegram deep link. In context, that concealment is more dangerous because the setup also recommends exposing the service publicly, which could let an under-reviewed backend process untrusted requests.
The markdown describes a full HTTP service with mutable POST endpoints, on-disk per-user storage, social interactions, and generated media, while the advertised skill purpose is only to return a Telegram deep link. In context, that concealment is more dangerous because the setup also recommends exposing the service publicly, which could let an under-reviewed backend process untrusted requests.
The markdown describes a full HTTP service with mutable POST endpoints, on-disk per-user storage, social interactions, and generated media, while the advertised skill purpose is only to return a Telegram deep link. In context, that concealment is more dangerous because the setup also recommends exposing the service publicly, which could let an under-reviewed backend process untrusted requests.
The markdown describes a full HTTP service with mutable POST endpoints, on-disk per-user storage, social interactions, and generated media, while the advertised skill purpose is only to return a Telegram deep link. In context, that concealment is more dangerous because the setup also recommends exposing the service publicly, which could let an under-reviewed backend process untrusted requests.
The code implements an interactive local CLI game, while the declared skill behavior says it should only reply with a Telegram deep link. This mismatch expands the effective capability surface beyond what reviewers and users would expect, which is dangerous because hidden or undeclared functionality can bypass trust assumptions and security review scope.
The manifest description frames the skill as responding to /pet or 'virtual pet' by returning a Telegram deep link, implying a lightweight routing behavior for a Mini App. This documentation shows the repository also contains a terminal CLI, two separate web backends, local JSON persistence, Cloudflare tunnel deployment, and multiple bot integration scripts, which is materially broader than the stated skill behavior.
The README describes shareable visit links of the form pet_<userId> and use of Telegram share URLs without warning that these links embed user-associated identifiers and can be redistributed to groups. This creates a privacy risk by making user-linked pet profiles and social graph interactions easier to expose, enumerate, or correlate across chats.
The README explicitly documents persistent storage of per-user records in users/{userId}.json and memorial/{userId}.json, including death/memorial state, but provides no notice about retention, visibility, or lifecycle of that data. In a social Telegram Mini App, this can expose user-associated gameplay history and identifiers beyond user expectations, especially because memorial pages and shared links are part of the product design.
The skill declares no explicit tool permissions even though it describes capabilities that may access environment-dependent resources and invoke local tooling such as Python and install scripts. In agent ecosystems, missing scope declarations can lead to overbroad execution or unclear trust boundaries, making it harder to constrain what the skill is allowed to do.
The trigger instructions explicitly require the agent to reply in Turkish ('yanıt olarak şu plain-text'i yollar') rather than matching the user's language or offering a choice. This creates a language-policy issue because the skill imposes a locale/language preference without documented opt-in or justification.
The skill recommends creating a persistent named Cloudflare tunnel and publicly routing a domain to a locally hosted service. In this context, that increases risk because the same document notes Telegram initData HMAC validation is still TODO, so a publicly reachable app may accept unauthenticated or spoofed requests and remain exposed beyond the intended session.
3. (Opsiyonel) **Named tunnel** (URL kalıcı, viral patlama için kritik):
```bash
cloudflared tunnel create openclaw-pet
cloudflared tunnel route dns openclaw-pet pet.<your-domain>
cloudflared tunnel run openclaw-pet
The language detection returns 'tr' whenever the user's locale is not one of the supported languages. This imposes a specific language on users without offering a choice, which is a natural-language locale policy concern under the stated rules.
The document is declared with lang="tr", and the runtime fallback also defaults to Turkish when language detection data is unavailable. The file does not present an explicit language choice or opt-in, so users may be forced into a specific locale by default.
The code assigns LANG to the detected language or 'tr' as a hard fallback. Without an explicit user choice, this enforces a specific language for users whose locale cannot be detected, which matches the policy's language/locale violation pattern.
The code posts the Telegram-derived userId and pet metadata to /api/pet during pet creation, and similar background requests appear elsewhere in the file. There is no visible warning, notice, or explanatory text in this HTML informing users that their Telegram identifier and gameplay data will be transmitted to a server.
This JavaScript file contains natural-language comments and a returned user-facing message in Turkish, but there is no indication that the skill is region-specific or that users can opt into the locale. The policy explicitly flags language/locale constraints when a specific language is imposed without user choice or justification.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
echo " ✓ already at $target (source)"
return
fi
mkdir -p "$parent"
if [[ -L "$target" ]]; then
rm "$target"
elif [[ -e "$target" ]]; then
The skill writes persistent state to ~/.openclaw-pet.json even though the declared behavior is narrowly described as sending a Telegram deep link. Undeclared persistence is a security concern because it creates local side effects, stores data on disk, and indicates the implementation is doing more than the manifest promises.
Local filesystem read/write access is not justified by a skill whose stated purpose is to respond with a Telegram deep link. Even though this code only reads and writes a pet state file, unnecessary file access increases attack surface and violates least-privilege expectations for the declared skill context.
The API trusts a caller-supplied userId for all stateful operations and persists pet data on disk without any authentication or session binding. An attacker can impersonate any user by sending arbitrary userId values, then read, modify, befriend, revive, or otherwise manipulate another user's pet and social graph.
POST /api/pet → action dispatcher
Actions:
create {type, name} → spawn new pet
feed / play / sleep → mutate own pet
visit {targetUserId} → read another user's pet (read-only)
befriend {targetUserId} → add bidirectional friendship + bond bonus
The helper selects Turkish as the default language whenever no language is provided, via (lang or 'tr'). This is a natural-language locale choice imposed by default rather than offered as an explicit user opt-in, which can violate language/locale policy requirements.
Incoming requests set lang to Turkish when the user does not supply a language, using (data.get('lang') or 'tr').lower(). That behavior enforces a specific locale by default instead of making language selection optional or user-driven.
A standalone terminal readline pet game is a separate execution mode unrelated to replying with a Telegram Mini App deep link. That capability is not an obvious implementation requirement of the declared Telegram skill purpose.
The express dependency is also specified with a caret range, so installations are not reproducible and may resolve to different releases over time. That increases exposure to known or newly introduced supply-chain issues, especially for a package that commonly sits on the network edge in web apps.
"keywords": ["openclaw", "skill", "pet", "game", "cli"],
"author": "TURAC",
"license": "MIT",
"dependencies": { "chalk": "^4.1.2", "express": "^4.18.0" }
}
No suspicious patterns detected.