Back to skill

Security audit

尤里改 Facebook Graph API 代理服务使用指南

Security checks for vulnerabilities and agentic risk

Overview

The skill is only documentation, but it asks users to route broad Facebook Graph API access through a third-party proxy that injects stored Facebook tokens and supports write, delete, and upload operations.

Review this before installing if the Facebook account, ad account, or business data is sensitive. Use only accounts and baiz.ai tokens with the minimum needed permissions, confirm how baiz.ai stores Facebook authorizations and logs requests, and avoid destructive or production Graph API operations until tenant isolation, token revocation, upload handling, and data-retention controls are clear.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:31
Finding
Overprivileged Third-Party Facebook Graph API Proxy## Vulnerability Details **File Location**: `SKILL.md`, lines 31-64 **Vulnerability Type**: Unrestricted third-party API proxy with automatic privileged credential injection **Risk Level**: Medium ### Evidence The following is an English translation of the complete affected documentation segment: ```markdown ### Step 4: Start Making Requests Replace the domain of every original Facebook Graph API endpoint with `facebook-graph.baiz.ai`, and place the obtained token in the `Authorization: Bearer {token}` request header. ## Usage Example **Original Facebook API request:** GET https://graph.facebook.com/v25.0/act_123456/campaigns?fields=name,status Authorization: Bearer {facebook_access_token} **Proxy request:** GET https://facebook-graph.baiz.ai/v25.0/act_123456/campaigns?fields=name,status Authorization: Bearer {baiz_api_token} Only two changes are required: 1. Change the domain from `graph.facebook.com` to `facebook-graph.baiz.ai`. 2. Replace the token with the bearer token obtained from the proxy platform. There is no need to provide an `access_token` parameter. The system automatically resolves and injects the corresponding Facebook Access Token based on the resource ID in the request path. All other parameters, paths, request methods, and request bodies remain unchanged and are compatible with the official Facebook Graph API. ## Supported Requests - All HTTP methods, including GET, POST, PUT, and DELETE - All Facebook Graph API endpoints and versions - File uploads using multipart/form-data - JSON and form request bodies ``` ### Technical Analysis The Skill directs users to route all Facebook Graph API traffic through the third-party host `facebook-graph.baiz.ai`. The proxy automatically selects and injects a stored Facebook access token based on a resource identifier supplied in the request path. The documented interface permits every Graph API endpoint and version, all major ...[truncated 2604 chars]
Remediation
## Remediation Suggestions 1. Default proxy credentials to read-only, narrowly scoped Facebook permissions. 2. Implement an explicit allowlist of supported API versions, endpoints, fields, and HTTP methods. 3. Issue separate proxy scopes for read, create, update, upload, and delete operations. 4. Require explicit confirmation or step-up authentication for destructive and high-impact operations. 5. Validate tenant ownership and caller authorization for every resource ID before selecting or injecting a Facebook token. 6. Bind each proxy token to an explicit set of Facebook accounts and resource identifiers rather than relying only on request-path resolution. 7. Use short-lived proxy and Facebook tokens, support immediate revocation, and rotate credentials regularly. 8. Apply request-size limits, upload validation, rate limits, replay protection, and abuse monitoring. 9. Encrypt stored credentials and sensitive proxy traffic, and prevent tokens and request bodies from appearing in logs. 10. Document data retention, request logging, file handling, subprocessors, incident response, and credential revocation procedures. 11. Replace the recommendation to proxy every Facebook endpoint with task-specific examples that request only the minimum required access. 12. Commission a separate implementation-level assessment of the proxy's authentication, resource mapping, tenant isolation, and authorization controls.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Credential Access

High
Category
Privilege Escalation
Content
1. 域名 `graph.facebook.com` → `facebook-graph.baiz.ai`
2. Token 换成从尤里改后台获取的 Bearer Token

**无需传递 `access_token` 参数**,系统会根据请求路径中的资源 ID 自动解析并注入对应的 Facebook Access Token。

其余所有参数、路径、请求方法、请求体保持不变,与 Facebook Graph API 官方文档完全一致。
Confidence
94% confidence
Finding
The skill explicitly states that users do not need to pass a Facebook access_token because the proxy will automatically resolve and inject the corresponding Facebook Access Token based on the resource ID in the request path. That means the third-party service holds and uses upstream Facebook credentials on behalf of users, materially expanding credential exposure and creating a credential broker/proxy model that could enable unauthorized use, account abuse, or opaque access to Facebook resources if the proxy is compromised or misused.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The documentation instructs users to replace the official Facebook Graph API hostname with a third-party proxy and states that all paths, parameters, methods, request bodies, and file uploads should be sent unchanged, but it does not clearly warn that this causes all API traffic and uploaded data to transit through and be processed by baiz.ai. This creates a significant confidentiality and integrity risk because sensitive business data, uploaded files, and API operations are delegated to an intermediary that can observe, retain, modify, or misuse requests and responses.

Natural-Language Policy Violations

Low
Confidence
83% confidence
Finding
The skill description and all user-facing instructions are written only in Chinese, with no indication that other languages are supported or that Chinese is a deliberate region-specific requirement. Under the policy, a skill should not impose a specific language without user opt-in or documented justification.

Static analysis

No suspicious patterns detected.