T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/web_server.py:44- Finding
Unauthenticated Dashboard Exposes Sensitive Health Data and Mutation APIs on All Network Interfaces
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
NutriCoach appears to be a legitimate nutrition tracker, but its dashboard can expose and let others change sensitive health data on the local network.
Install only if you are comfortable handling sensitive health data locally. Do not run the dashboard on an untrusted network unless it is fixed to bind to 127.0.0.1 and protected with authentication; avoid cloud OCR for private images unless you trust the provider; use simple usernames only; and keep exported or backup database files secured.
scripts/web_server.py:44Unauthenticated Dashboard Exposes Sensitive Health Data and Mutation APIs on All Network Interfaces
scripts/web/static/app.js:235Persistent Cross-Site Scripting Through Unsafely Rendered Pantry Fields
scripts/backup_db.py:15Unsanitized Usernames Permit Path Traversal During Database and Backup Operations
requirements.txt:6Unpinned Dependencies and Unversioned Remote JavaScript Create Supply-Chain Exposure
The supplied code chunk does not implement a health data management system. Its actual purpose is much narrower: it provides a static nutrition reference database for Chinese foods and basic lookup utilities. While this partially supports the declared capability of querying food nutrition information and could be a supporting component of a larger diet system, it does not perform the majority of the declared functions such as recording user data, tracking time series, generating recommendations, OCR/photo recognition, pantry management, exports, backups, multi-user isolation, or dashboard visualization. Therefore the description materially overstates what this code chunk actually does.
The username is interpolated directly into the SQLite filename with no validation or canonicalization, so path traversal sequences such as '../' can escape the intended data directory. In this skill, that can let an attacker point the code at arbitrary files the process can access, causing unauthorized reads, database probing, or creation/use of attacker-chosen SQLite files outside the per-user isolation boundary.
The entire skill document is written in Chinese and presents the design guidance exclusively in that language, with no indication that users may choose another language or that the locale restriction is intentional for a region-specific audience. Under the policy, natural-language content that imposes a language without opt-in can be a locale-policy violation.
The README presents Kimi Vision as the default OCR engine and notes only that it requires an API key, but does not warn that uploaded food/package images may be transmitted to a third-party service. In a health-tracking skill, images can contain sensitive dietary, medical, or incidental personal information, so omission of this disclosure can lead users to unknowingly exfiltrate personal data off-device.
The README documents export, backup, and restore workflows for personal health databases without warning that these operations duplicate sensitive user data and that restore may overwrite current records. Because the skill manages body metrics, diet logs, and other health-related data, users may mishandle exported files or unintentionally replace data without understanding the privacy and integrity risks.
This markdown file contains user-facing natural language only in Chinese, and nowhere indicates that the skill is region-specific or that users may choose another language. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.
The skill advertises capabilities that imply shell, filesystem, environment, and network access, but the manifest does not declare any explicit tool scope or permissions. This weakens security review and least-privilege enforcement, making it easier for a host agent to grant broader access than users expect, especially given the skill handles sensitive health data and backups.
This section switches to Chinese for core setup and usage instructions, including the recommended AI assistant workflow and command examples, while the rest of the document is primarily in English. That creates an implicit language constraint for users without stating that the skill is Chinese-language or offering an opt-in or alternative language path.
The documentation describes cloud OCR configuration and use but does not clearly warn that food packaging images and extracted text may be sent to third-party providers. Because the skill processes personal health and diet data, users may unknowingly transmit sensitive information off-device without informed consent.
The skill explicitly supports sending OCR requests to an external API endpoint, which creates a real data exfiltration path for uploaded images, extracted nutrition text, and possibly related user context. In a health-oriented skill, this is more sensitive because packaging images or associated metadata can reveal dietary habits, medical preferences, or household information.
vision:
api_key: "your-api-key"
base_url: "https://api.moonshot.cn/v1" # 或其他兼容 OpenAI 的 API
model: "kimi-k2.5"
The metadata describes tracking body metrics, meals, OCR from food packaging photos, and intelligent recommendations, all of which involve privacy-sensitive health and lifestyle data, but it provides no user-facing privacy warning or handling summary. This omission is more concerning in this context because the skill is explicitly health-focused and multi-user, increasing the sensitivity of collected data and the risk of users sharing information without informed consent.
The meal logging flow indicates that food photos may be sent to a Vision API for identification, but the architecture does not warn that user-uploaded images and related metadata may leave the local environment. Meal photos can reveal health conditions, routines, locations, or other sensitive context, so undisclosed third-party transmission creates a meaningful privacy and compliance risk.
The architecture explicitly stores highly sensitive health data in per-user local SQLite files under a predictable workspace path, but provides no mention of encryption, OS-level access controls, consent, or privacy warnings. In a health-coaching skill, weight, body fat, meal history, and related metrics are sensitive personal data, so local plaintext storage can expose users to privacy breaches from other local users, malware, backups, or accidental file sharing.
The configuration includes a third-party API endpoint for vision/OCR, confirming that user data may be transmitted to an external service. While using an HTTPS endpoint is not inherently malicious, in this skill context the transmitted content may include sensitive dietary and health-related images, making external transfer security- and privacy-relevant if not tightly controlled and disclosed.
vision: api_key: "your-api-key" base_url: "https://api.moonshot.cn/v1" model: "kimi-k2.5"
This markdown file contains core schema descriptions in Chinese after starting in English, which effectively forces a specific language for important documentation content. The file does not state that it is intentionally Chinese-only or provide any user opt-in or alternative language path, which matches the language/locale policy violation criteria.
The pantry and pantry_usage sections switch to Chinese for table descriptions and metadata, and later operational guidance remains Chinese-only. Because these are substantive instructions rather than incidental labels, the file imposes a locale choice without opt-in or justification.
This section contains important behavioral guidance for units and calculation rules, but it is only available in Chinese. Since no language selection, opt-in, or justification is provided, this is a natural-language locale policy issue under the stated rules.
The documentation states that custom_foods.unit and food_items.unit are supported and describes behavior for recording meal quantities by unit. However, the actual CREATE TABLE for custom_foods contains no unit column (L416-L443), and the food_items table also has no unit column (L388-L410). This is an active contradiction between documentation and implemented schema, not merely an omission.
该 markdown 文件说明了 init_db.py --force 会覆盖现有数据库,但仅作为参数说明出现,没有明确提醒用户这可能导致现有数据被覆盖。同样,这类会影响用户数据完整性的操作按规则应有显式警告。
backup_db.py restore --file <backup> 是会直接影响现有用户数据状态的恢复操作,但文档仅给出命令示例,没有提示恢复可能覆盖当前数据或建议先执行备份。根据 markdown 文件的告警要求,这属于缺少用户警示。
The guide documents a cloud OCR mode that sends food-package images and extracted nutrition data to third-party vision APIs, but it does not clearly warn users about external data transmission, retention, or privacy implications. Because the product manages personal health and dietary data, uploaded images may contain sensitive information and metadata, making silent off-device processing a meaningful privacy risk.
The documented cloud OCR configuration includes a third-party API endpoint, confirming that user-supplied image data can be transmitted externally. In the context of a nutrition and health management tool, this expands the privacy and compliance surface because food labels, purchase details, and potentially embedded metadata leave the local environment.
vision:
api_key: "your-api-key"
base_url: "https://api.moonshot.cn/v1"
model: "kimi-k2.5"
This second configuration example again advertises a live external OCR endpoint and API key usage, reinforcing that the feature depends on off-device processing by a third party. Repeating such examples without adjacent privacy notice or handling guidance can normalize sensitive data transmission without informed user awareness.
vision:
api_key: "sk-xxxxx"
base_url: "https://api.moonshot.cn/v1"
model: "kimi-k2.5"
The backup and restore commands are presented without warning that restore operations may overwrite current user data or cause irreversible rollback if the wrong file is chosen. In a multi-user health-data application, unclear restore semantics increase the risk of accidental data loss, integrity issues, or restoring another user's snapshot.
The daily plan returns suggested_foods exclusively as Chinese-language strings, which imposes a specific language on all users. This is a natural-language locale policy issue because the file provides no opt-in, fallback, or documented justification for restricting output language.