T09 · Insecure Skill Coding Practices
- Location
pipeline-mcp.yaml:5- Finding
Unauthenticated Public Endpoint Can Consume Operator OpenAI Quota
- Content
View full analysis
Vulnerability Details
File Location:
pipeline-mcp.yaml, lines 5–12 and 25–27
Vulnerability Type: Unauthenticated externally bound service
Risk Level: MediumVulnerable Code
yaml http: enabled: true address: "0.0.0.0:${PORT:-8080}" input: http_server: path: /score allowed_verbs: [POST] timeout: 60sEvery accepted request invokes the configured remote model:
yaml - openai_chat_completion: api_key: "${OPENAI_API_KEY}" model: gpt-4o-miniTechnical Analysis
The HTTP service binds to
0.0.0.0, making it reachable through every available network interface unless an external firewall prevents access. The/scoreendpoint has no configured authentication or authorization. The configuration also shows no application-level rate limit or request-size limit.Each request reaching this endpoint causes a remote OpenAI operation authenticated with the operator-provided
OPENAI_API_KEY. Consequently, an untrusted network client can cause chargeable API activity using the operator's account. The 60-second timeout limits individual request duration but does not prevent repeated or concurrent requests.Attack Path
- The operator starts
pipeline-mcp.yamlon a system whose configured port is reachable by an attacker. - The service listens on all interfaces, using port 8080 by default.
- The attacker repeatedly sends unauthenticated
POSTrequests containing arbitrary text to/score. - Each accepted request reaches
openai_chat_completion. - The pipeline authenticates upstream requests with the operator's
OPENAI_API_KEY. - Repeated or concurrent requests consume OpenAI quota, incur costs, and consume local and upstream service capacity.
Impact Assessment
A remote unauthenticated attacker can submit arbitrary sentiment-analysis input and consume resources associated with the service and the operator's OpenAI account. The likely impact includes unexpected API charges, quota exhaustion, ...[truncated 407 chars]
- The operator starts
- Remediation
View remediation
Remediation Suggestions
- Bind the service to loopback by default, such as
127.0.0.1:${PORT:-8080}, unless external access is explicitly required. - Require strong authentication for
/score, using an API token, authenticated reverse proxy, or equivalent mechanism. - Enforce authorization so each caller can use only its assigned service scope and quota.
- Add per-client and global rate limits, concurrency limits, and bounded request quotas.
- Configure a strict request-body size limit and validate that the submitted text is a bounded string before invoking OpenAI.
- Deploy the endpoint behind a TLS-enabled reverse proxy and restrict ingress with firewall rules or private-network controls.
- Configure OpenAI account budget alerts and spending limits, and use a dedicated API key with the minimum necessary project scope.
- Add monitoring and alerting for anomalous request rates, repeated failures, unusual token consumption, and unexpected spending.
- Bind the service to loopback by default, such as
