Summary
The /testcase-detail/task-log endpoint in ClusterFuzz (src/appengine/handlers/testcase_detail/show.py, lines 637–653) has no authentication check, allowing any unauthenticated request to read Cloud Logging task execution logs with log filter injection.
Vulnerable Code
The handler accepts task_id, task_name, and testcase_id parameters and passes them directly to testcase_status_events.get_task_log(). Inside _get_task_log_query_filter() (testcase_status_events.py, lines 222–228), these values are string-interpolated without escaping into a Cloud Logging filter:
f'jsonPayload.extras.task_id="{task_id}" AND ...'
Impact
- Unauthenticated log access: Any unauthenticated request can read task execution logs for any testcase containing crash details, bot names, memory addresses, and file paths
- Log filter injection: Supplying
task_id=x" OR "1"="1 bypasses the per-testcase constraint and returns logs from all testcases across all projects, enabling bulk exfiltration of pre-disclosure vulnerability information
Suggested Fix
- Add authentication decorator to the
/testcase-detail/task-log endpoint
- Parameterize or escape
task_id, task_name, and testcase_id values in the Cloud Logging filter string
Summary
The
/testcase-detail/task-logendpoint in ClusterFuzz (src/appengine/handlers/testcase_detail/show.py, lines 637–653) has no authentication check, allowing any unauthenticated request to read Cloud Logging task execution logs with log filter injection.Vulnerable Code
The handler accepts
task_id,task_name, andtestcase_idparameters and passes them directly totestcase_status_events.get_task_log(). Inside_get_task_log_query_filter()(testcase_status_events.py, lines 222–228), these values are string-interpolated without escaping into a Cloud Logging filter:f'jsonPayload.extras.task_id="{task_id}" AND ...'Impact
task_id=x" OR "1"="1bypasses the per-testcase constraint and returns logs from all testcases across all projects, enabling bulk exfiltration of pre-disclosure vulnerability informationSuggested Fix
/testcase-detail/task-logendpointtask_id,task_name, andtestcase_idvalues in the Cloud Logging filter string