CVE-2024-58354
CriticalCVSS 9.9Exploitation Probability (EPSS)
Low risk31th percentile - higher than 31% of all known CVEs
Summary
Vulnerability in the cal.com repository (later cal.diy) in GitHub Actions. The pr.yml workflow uses the pull_request_target trigger with default write permissions, allowing an attacker to execute arbitrary commands with the write-scoped GITHUB_TOKEN. An attacker can push commits, merge or mutate pull requests, add or delete comments, and delete or force-push branches.
Risk Assessment
Risk of full repository takeover, leading to malicious code injection and project integrity compromise.
Recommendation
No patch available. Modify the workflow to use a safer trigger (e.g., pull_request) and restrict token permissions.
Original NVD description (English source)
cal.com (calcom repository, later renamed cal.diy) is affected by a repository takeover vulnerability in its GitHub Actions workflows. The workflow pr.yml uses the pull_request_target trigger with the repository's default write permissions and passes them down to check-types.yml. check-types.yml then performs a 'dangerous' checkout of the attacker-submitted pull request code (via the dangerous-git-checkout action) and subsequently executes it (through yarn install and package.json scripts). An attacker can open a pull request whose code runs arbitrary commands with the repository's write-scoped GITHUB_TOKEN, allowing them to push commits, merge or mutate pull requests, add or delete comments, and delete or force-push branches, thereby compromising the repository. The main branch is affected; no patched version is available.

