T09 · Insecure Skill Coding Practices
- Location
securitysuite/models.py:148- Finding
Unbounded Batch Item Size Enables Resource Exhaustion
- Content
View full analysis
BatchResponse: results = [] safe = 0 flagged = 0 for skill_content in request.skills: name, verdict, scan_f, undeclared, inj_p, _, _ = _run_full_audit(skill_content) ``` ### Technical Analysis `BatchRequest.skills` limits the number of list entries to 100 but does not constrain the length of each string. In contrast, the single-skill and text input models impose explicit limits of 500,000 and 100,000 characters. Each batch entry is synchronously processed by `_run_full_audit`, which invokes several pattern scanners and scope extractors. A request can therefore contain up to 100 arbitrarily large strings, resulting in substantial request-parsing memory use and repeated CPU-intensive scanning. Because this work runs synchronously inside an `async` endpoint, it can also block the application event loop. The issue is exploitable by any party able to reach `/v1/batch`. The documented Uvicorn command binds to localhost by default, which reduces default exposure, but the endpoint has no authentication or application-level body-size control if the service is exposed through another deployment configuration. ### Attack Path 1. An attacker obtains network access to the SecuritySuite API. 2. The attacker submits `POST /v1/batch` with up to 100 extremely large strings in the `skills` array. 3. The ASGI stack parses and retains the oversized JSON body. 4. The endpoint synchronously runs every large string through multiple scanners and extra ...[truncated 530 chars]- Remediation
View remediation
