T09 · Insecure Skill Coding Practices
- Location
docs/captcha_strategies.md:110- Finding
Unrestricted Local File Upload to an Unspecified CAPTCHA Service
- Content
View full analysis
- Remediation
View remediation
MAX_SIZE: raise ValueError("CAPTCHA image is too large") with Image.open(candidate) as image: image.verify() with candidate.open("rb") as image_file: response = requests.post( endpoint, files={"image": (candidate.name, image_file, "image/png")}, headers={"Authorization": f"Bearer {api_key}"}, timeout=15, ) response.raise_for_status() return response.json()["solution"] ``` ]]>
