Summary
OneUptime's GitHub App callback logic prior to version 10.0.19 accepts attacker-controlled state and installation_id values and updates a project's GitHub binding without verifying that the caller is authorized for that project.
With a valid GitHub App installation ID, an attacker can overwrite another project's GitHub App installation association, enumerate repositories, and create code repository records in arbitrary projects, enabling cross-project data exposure and abuse of CI/integration workflows.
Affected context
This vulnerability arises in OneUptime deployments that:
- Integrate with GitHub via the OneUptime GitHub App
- Rely on callback endpoints that process state and installation_id parameters
- Store GitHub App installation bindings per project (e.g., Project.gitHubAppInstallationId)
The issue manifests when the server:
- Trusts state and installation_id values from the GitHub App callback without tightly binding them to an authenticated user session and project
- Lacks robust authorization checks on related GitHub endpoints that enumerate repositories or create CodeRepository records.
Exploit preconditions
- Attack surface: Publicly accessible or externally reachable GitHub App callback and related GitHub integration endpoints.
- Required access:
- Ability to complete a GitHub App installation or access a valid installation_id.
- Network access to the OneUptime instance's GitHub integration endpoints.
- Trigger point:
- Submission of a GitHub App callback request where the attacker supplies crafted state and installation_id values.
- Subsequent use of the bound installation_id against GitHub-related endpoints in the context of an arbitrary target project.
- Why exploitation is possible:
- The callback logic trusts attacker-controlled state and installation_id fields and updates Project.gitHubAppInstallationId with isRoot: true without confirming that the caller is authorized for the target project.
- Related endpoints that enumerate repositories or create CodeRepository records do not enforce effective authorization tied to project ownership, allowing use of a valid installation_id across projects.
Why this happens
The core issue is improper authorization around project-scoped resource binding and subsequent API usage.
Instead of treating the GitHub App callback's state and installation_id as untrusted and tightly coupling them to an authenticated user and specific project, the application:
- Accepts these parameters as authoritative,
- Updates Project.gitHubAppInstallationId with elevated flags (isRoot: true),
- And exposes additional endpoints that rely on installation_id alone for access decisions.
This aligns with:
- CWE-639: Authorization Bypass Through User-Controlled Key — project identity and binding are inferred from user-controllable values like state and installation_id.
- CWE-345: Insufficient Verification of Data Authenticity — state is not robustly validated as an integrity-protected token bound to the initiating session.
- CWE-862: Missing Authorization — related GitHub endpoints fail to enforce project-level authorization before repository enumeration and CodeRepository creation.
Conceptually, the bug class is "trusting user-controlled identifiers and state in place of server-side authorization checks," allowing cross-tenant or cross-project binding and misuse of shared integration credentials.
Potential impact
- An attacker may overwrite another project's GitHub App installation binding, effectively hijacking the project's GitHub integration.
- An attacker could enumerate repositories associated with a valid installation_id in the context of arbitrary target projects.
- An attacker may create or manipulate CodeRepository records within projects they do not own, polluting project configuration and metadata.
- Cross-project data exposure could occur, including visibility into repository names, owners, and potentially sensitive integration metadata.
- Abuse of CI or automation workflows that rely on the GitHub integration may become possible, enabling unauthorized jobs or misleading project configuration.
General mitigation guidance
Effective mitigation focuses on enforcing strict, server-side authorization and treating integration callbacks as untrusted until fully validated:
- Bind callbacks to authenticated sessions and projects:
- Associate the GitHub App installation flow with a specific authenticated user and project on the server side, and ensure the callback can only complete for that same user and project.
- Harden state handling:
- Use cryptographically signed, time-limited state tokens that encode the intended project ID and user ID.
- Reject callbacks where the state token is missing, invalid, expired, or does not match the initiating session and project.
- Enforce project-scoped authorization on all GitHub endpoints:
- Require that any repository enumeration or CodeRepository creation is authorized against the current authenticated user's rights for the target project.
- Avoid accepting installation_id alone as proof of authority; tie usage to the project's stored, server-side context.
- Apply least privilege to integrations:
- Limit what actions GitHub integrations can perform on behalf of a project, and constrain access to only the repositories and operations explicitly required.
- Centralize access control logic:
- Implement a common authorization layer for project-level operations so that every endpoint that manipulates integration bindings or CodeRepository records consistently checks ownership and permissions.
How teams detect issues like this
Organizations can detect similar authorization flaws by:
- Static analysis and code scanning:
- Flagging endpoints that:
- Accept identifiers (e.g., projectId, installation_id, state) from the client and use them directly in queries or updates.
- Update cross-project resources without an explicit authorization check function or middleware.
- Detecting places where GitHub installation_id or external IDs are used as primary access-control keys.
- Targeted code review:
- Reviewing all OAuth-like and third-party integration callback flows to ensure:
- state parameters are cryptographically verifiable and bound to session/project.
- Project updates rely on server-side context rather than client-supplied project identifiers.
- Examining repository enumeration and CodeRepository creation routes for explicit, centralized authorization logic.
- Policy and test-based enforcement:
- Introducing automated tests that simulate a user trying to bind or use a GitHub installation_id across projects they do not own.
- Enforcing secure coding guidelines that prohibit reliance on client-controlled identifiers for authorization decisions.
- Runtime monitoring:
- Logging and alerting on unusual integration events, such as:
- Multiple projects binding to the same installation_id.
- Frequent cross-project attempts to create CodeRepository records by the same user/IP.

