CVE-2026-24480 Overview
CVE-2026-24480 is a remote code execution vulnerability affecting the QGIS open source geographical information system (GIS) repository. The vulnerability existed in a GitHub Actions workflow called "pre-commit checks" that utilized the insecure pull_request_target trigger pattern, allowing attackers to execute arbitrary code in a privileged context by submitting malicious pull requests.
This vulnerability represents a significant CI/CD supply chain security risk. Workflows using pull_request_target run with the base repository's credentials and have access to repository secrets. When combined with checking out and executing code from an external pull request, attackers could leverage this to compromise the repository, steal secrets, and execute arbitrary commands with elevated privileges.
Critical Impact
Attackers could execute arbitrary commands with elevated privileges, potentially compromising the entire QGIS repository, stealing repository secrets, and injecting malicious code into the codebase.
Affected Products
- QGIS GitHub Repository (versions prior to commit 76a693cd91650f9b4e83edac525e5e4f90d954e9)
- QGIS pre-commit checks GitHub Actions workflow
Discovery Timeline
- 2026-01-27 - CVE CVE-2026-24480 published to NVD
- 2026-01-27 - Last updated in NVD database
Technical Details for CVE-2026-24480
Vulnerability Analysis
This vulnerability stems from an insecure GitHub Actions workflow configuration pattern that has been widely documented as a security risk. The "pre-commit checks" workflow used the pull_request_target event trigger, which is designed to allow workflows to run in the context of the base repository rather than the forked repository that submitted the pull request.
The core issue arises from the combination of two factors: First, workflows triggered by pull_request_target execute with full access to the base repository's secrets and write permissions. Second, the vulnerable workflow checked out code from the pull request head (potentially attacker-controlled) and executed it. This creates a classic privilege escalation scenario where untrusted code runs with trusted credentials.
An attacker could exploit this by forking the QGIS repository, modifying the code that gets executed during the pre-commit checks (such as adding malicious commands to scripts or configuration files), and then submitting a pull request. The workflow would then execute the attacker's code with access to repository secrets, allowing them to exfiltrate sensitive credentials, modify the repository, or pivot to other connected systems.
Root Cause
The root cause is CWE-863: Incorrect Authorization. The workflow failed to properly isolate untrusted pull request code from privileged execution contexts. By using pull_request_target and subsequently checking out the pull request head, the workflow granted untrusted external code the same privileges as trusted internal code. This violates the principle of least privilege and creates an authorization bypass where external contributors could gain repository maintainer-level access.
Attack Vector
The attack vector is network-based and requires low privileges to exploit. An attacker needs only the ability to create a fork and submit a pull request to the QGIS repository—capabilities available to any GitHub user. The attack does not require user interaction beyond the victim repository having the vulnerable workflow enabled.
The exploitation flow involves:
- Attacker forks the QGIS repository
- Attacker modifies files that are executed during pre-commit checks to include malicious commands
- Attacker opens a pull request against the main QGIS repository
- The pull_request_target workflow triggers automatically
- The workflow checks out the attacker's malicious code
- Malicious code executes with access to repository secrets and write permissions
- Attacker exfiltrates secrets, modifies repository contents, or performs other malicious actions
The vulnerability mechanism centers on the GitHub Actions workflow configuration. When a workflow uses pull_request_target and then performs a checkout of the pull request code using actions like actions/checkout with ref: ${{ github.event.pull_request.head.sha }}, it executes untrusted code in a trusted context. For detailed technical information, see the GitHub Security Advisory GHSA-7h99-4f97-h6rw.
Detection Methods for CVE-2026-24480
Indicators of Compromise
- Unexpected workflow runs from external forks with unusual commands or network connections in workflow logs
- Unexplained modifications to repository secrets or access tokens
- Suspicious commits or changes to the repository from automated systems
- Anomalous API activity using repository credentials outside normal CI/CD patterns
Detection Strategies
- Audit GitHub Actions workflow configurations for pull_request_target triggers combined with checkout of pull request code
- Review workflow run history for suspicious executions from external contributors
- Monitor for secret access patterns that deviate from normal CI/CD behavior
- Implement GitHub Advanced Security features to detect potentially dangerous workflow patterns
Monitoring Recommendations
- Enable GitHub audit logs and monitor for repository secret access
- Set up alerts for workflow modifications and new workflow additions
- Regularly review GitHub Actions permissions and GITHUB_TOKEN scopes
- Monitor for unexpected outbound network connections from workflow runners
How to Mitigate CVE-2026-24480
Immediate Actions Required
- Update to commit 76a693cd91650f9b4e83edac525e5e4f90d954e9 or later which removes the vulnerable code
- Audit all GitHub Actions workflows for similar pull_request_target misconfigurations
- Rotate any repository secrets that may have been exposed
- Review workflow run history for signs of prior exploitation
Patch Information
The vulnerability was remediated in commit 76a693cd91650f9b4e83edac525e5e4f90d954e9. This commit removed the vulnerable workflow code that used the insecure pull_request_target pattern. Organizations using QGIS or maintaining forks should ensure they have this commit or later. The fix is available in the QGIS GitHub repository.
Workarounds
- If immediate patching is not possible, disable or modify workflows using pull_request_target to avoid checking out or executing pull request code
- Use the pull_request trigger instead of pull_request_target when execution of pull request code is required
- If pull_request_target must be used, never checkout the pull request head; only process metadata or use labeled workflow patterns
- Implement branch protection rules and require approval before workflows run on external pull requests
For repositories that must use pull_request_target, GitHub recommends splitting workflows to separate the privileged operations from code execution, ensuring that secrets and write access are never combined with untrusted code execution. See GitHub's documentation on keeping your GitHub Actions and workflows secure for detailed guidance.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

