Skip to content

GetCollectedHuntTimelines missing hunt approval check — bypasses access control #1159

Open

Description

@Ryujiyasu

Summary

In grr/server/grr_response_server/gui/api_call_router_with_approval_checks.py, the GetCollectedHuntTimelines handler (line 1059-1065) is missing a hunt approval check.

Vulnerable Code

def GetCollectedHuntTimelines(
    self, args, context=None
) -> api_timeline.ApiGetCollectedHuntTimelinesHandler:
    # Everybody can export collected hunt timelines.
    return self.delegate.GetCollectedHuntTimelines(args, context=context)

The immediately preceding handler GetHuntFilesArchive (line 1041-1048) correctly requires self.approval_checker.CheckHuntAccess(context, str(args.hunt_id)) before returning hunt data.

Impact

GetCollectedHuntTimelines retrieves full filesystem timeline data (all file paths, sizes, modification times, ownership, and permissions) for every client in the hunt, yet skips the same approval check that GetHuntFilesArchive enforces.

A user who has not received hunt approval can call GET /api/v2/hunts/<hunt_id>/collected-timelines and receive complete filesystem metadata for all client machines in the hunt.

Suggested Fix

Add self.approval_checker.CheckHuntAccess(context, str(args.hunt_id)) to GetCollectedHuntTimelines, consistent with the adjacent GetHuntFilesArchive handler.

Activity

  1. kx7m2qd commented on May 1, 2026

    @kx7m2qd

    Hi, I'd like to work on this. The fix is straightforward adding self.approval_checker.CheckHuntAccess(context, str(args.hunt_id)) to GetCollectedHuntTimelines, consistent with GetHuntFilesArchive on line 1041. I can open a PR with the fix and a test case to verify the access control is enforced. Is this available to work on?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions