Summary
Trigger.dev before 4.6.0 does not adequately verify that an authenticated user controls a GitHub App installation before associating it with an organization. An attacker who can replay state cookies and identify installation records may claim another user's installation and gain unauthorized access to the victim's repositories.
Affected context
The vulnerability occurs in the GitHub App installation and organization-binding workflow of affected Trigger.dev deployments. It becomes risky when the application relies on authenticated session state and installation identifiers without confirming that the requesting user controls the specific GitHub App installation being linked.
Exploit preconditions
- Attack surface: GitHub App installation and organization-binding workflow
- Required access: An authenticated Trigger.dev account capable of initiating the binding process
- Trigger point: Associating a GitHub App installation with an organization
- Additional condition: The attacker must be able to replay relevant state cookies and determine valid, sequential installation identifiers
- Why exploitation is possible: The application fails to verify ownership or control of the selected GitHub App installation before binding it
Why this happens
The underlying bug is an authorization validation failure in a resource-binding workflow. The application authenticates the requester but does not adequately authorize whether that requester controls the GitHub App installation being attached to an organization. This maps to CWE-639: Authorization Bypass Through User-Controlled Key, where a user-controlled identifier can select another user's resource without an effective ownership check.
Potential impact
- An attacker may bind a victim's GitHub App installation to an unauthorized organization
- The attacker could gain access to repositories available through the claimed installation
- Private source code, configuration, or repository metadata may be exposed
- Unauthorized repository actions or data modification could occur
- The affected organization may experience supply-chain or account-integrity risks
General mitigation guidance
Mitigation generally focuses on enforcing object-level authorization at every GitHub App installation binding operation.
Common defensive patterns include:
- Verify server-side that the authenticated user controls the specific installation before binding it
- Use authorization checks based on trusted installation ownership and organization relationships rather than user-supplied identifiers alone
- Bind state tokens to the initiating session, user, organization, and intended installation, with single-use and expiration properties
- Avoid relying on sequential or discoverable identifiers as authorization evidence
- Apply least privilege to GitHub App permissions and repository access
- Review and revoke existing bindings that cannot be associated with a verified owner
How teams detect issues like this
Organizations can look for:
- Static analysis and code review findings where resource identifiers are accepted without object-level authorization checks
- Binding endpoints that validate authentication but do not validate ownership or tenant boundaries
- Reusable, weakly scoped, or long-lived OAuth and workflow state cookies
- Requests that enumerate installation identifiers or repeatedly attempt installation-to-organization associations
- Audit events showing unexpected GitHub App bindings, repository access, or organization changes
Automated security review tools and policy checks can help flag missing authorization controls in resource-selection workflows.

