Tainted flow: 'feedback_path' from os.environ.get (line 784, credential/environment) → pathlib.Path.write_text (file write)
Medium
- Category
- Data Flow
- Content
feedback_path = Path(os.environ.get("FEEDBACK_PATH", "/tmp/feedback.json")) try: data = json.loads(body) feedback_path.write_text(json.dumps(data, indent=2, ensure_ascii=False), encoding="utf-8") self.send_response(200) self.send_header("Content-Type", "application/json") self.end_headers()- Confidence
- 94% confidence
- Finding
- The POST /api/feedback handler writes attacker-controlled JSON to a filesystem path derived from the FEEDBACK_PATH environment variable, with no authentication, CSRF protection, or path restriction. In the skill context this viewer is a local analysis utility, so exposing an unnecessary write primitive increases risk of local file clobbering or abuse if a browser page or local user can reach the endpoint while the server is running.
