MITRE ATT&CK / Techniques / T1677

Poisoned Pipeline Execution

ID
T1677
Tactics
TA0002 Execution
Platforms
SaaS
Data sources
Cloud Service Modification, Cloud Service Metadata, Cloud Storage Access, File Metadata, Command Execution
Source
attack.mitre.org
MITRE last modified
12 May 2026

Adversaries may manipulate continuous integration / continuous development (CI/CD) processes by injecting malicious code into the build process. There are several mechanisms for poisoning pipelines:

  • In a <b>Direct Pipeline Execution</b> scenario, the threat actor directly modifies the CI configuration file (e.g., gitlab-ci.yml in GitLab). They may include a command to exfiltrate credentials leveraged in the build process to a remote server, or to export them as a workflow artifact.[1][2]
  • In an <b>Indirect Pipeline Execution</b> scenario, the threat actor injects malicious code into files referenced by the CI configuration file. These may include makefiles, scripts, unit tests, and linters.[2]
  • In a <b>Public Pipeline Execution</b> scenario, the threat actor does not have direct access to the repository but instead creates a malicious pull request from a fork that triggers a part of the CI/CD pipeline. For example, in GitHub Actions, the pull_request_target trigger allows workflows running from forked repositories to access secrets. If this trigger is combined with an explicit pull request checkout and a location for a threat actor to insert malicious code (e.g., an npm build command), a threat actor may be able to leak pipeline credentials.[1][3] Similarly, threat actors may craft pull requests with malicious inputs (such as branch names) if the build pipeline treats those inputs as trusted.[4][5][6] Finally, if a pipeline leverages a self-hosted runner, a threat actor may be able to execute arbitrary code on a host inside the organization’s network.[7]

By poisoning CI/CD pipelines, threat actors may be able to gain access to credentials, laterally move to additional hosts, or input malicious components to be shipped further down the pipeline (i.e., Supply Chain Compromise).

Detection

Mitigations (2)

M1018 User Account Management

Ensure that CI/CD pipelines only have permissions they require to complete their operations. Additionally, limit the number of users who have write access to internal repositories to only those necessary.

M1054 Software Configuration

Where possible, avoid allowing pipelines to run unreviewed code. Where this is necessary, ensure that these pipelines are executed on isolated nodes without access to secrets. In GitHub, avoid using the pull_request_target trigger if possible, do not treat user-controlled inputs (such as branch names) as trusted, and do not use self-hosted runners on public repositories.

Groups (2)

Software (3)

References

  1. Unit 42 Palo Alto GitHub Actions Supply Chain Attack 2025
  2. OWASP CICD-SEC-4
  3. GitHub Security Lab GitHub Actions Security 2021
  4. Wiz Ultralytics AI Library Hijack 2024
  5. Synactiv Hijacking GitHub Runners
  6. GitHub Security Labs GitHub Actions Security Part 2 2021
  7. John Stawinski PyTorch Supply Chain Attack 2024