Join our Newsletter — 33% off our NHI Course
Home› Glossary› Threats, Abuse & Incident Response› CICD-SEC-4 Poisoned Pipeline Execution
Threats, Abuse & Incident Response

CICD-SEC-4 Poisoned Pipeline Execution

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: Threats, Abuse & Incident Response

CICD-SEC-4 Poisoned Pipeline Execution is an OWASP Top 10 CI/CD Security Risk in which an attacker with source control access, but no direct access to the build system, alters pipeline configuration or files it references so malicious commands run in the pipeline. Defenders require review of pipeline changes, and run untrusted code on isolated runners without secrets.

What makes poisoned pipeline execution dangerous

Poisoned pipeline execution turns the CI/CD system into an unwitting execution engine. An attacker who can change workflow files, build scripts, or referenced configuration can make the pipeline run malicious commands under trusted automation, which is why the boundary between source control and build execution has to be treated as a security boundary.

The danger is not just code execution, but execution with pipeline context: repository permissions, build identities, network reach, artifact access, and sometimes secrets. That combination can turn an ordinary pull request or workflow edit into a path for secret theft, artifact tampering, or deeper compromise of delivery infrastructure.

How the attack path works in CI/CD

This risk usually starts where developers have more influence than operators expect. If an attacker can influence a pipeline definition, a reusable workflow, a referenced script, or an event payload that the pipeline trusts, they can redirect the pipeline to execute attacker-controlled logic without ever logging into the build host directly.

Common abuse patterns include privilege-amplified triggers, unsafe handling of untrusted input, and workflows that execute code before validation or approval. Guidance on OWASP CICD-SEC-4 Poisoned Pipeline Execution and GitHub Actions Script Injection Guide shows why event context, trigger choice, and script interpolation are central failure points.

Because the attacker is working through the pipeline itself, detection often depends on recognising abnormal workflow changes, suspicious runner behaviour, or unexpected command execution in jobs that should have been deterministic.

Where defenders look for exposure

Exposure checks begin with the repository and the workflow inventory, not with the runner. Teams need to know which pipelines can be edited by which contributors, which triggers run privileged jobs, and which workflows inherit secrets or broad tokens by default. That inventory is essential because the weakness often sits in the control plane, not in the build host.

Runner isolation matters as much as code review. Untrusted code should execute on isolated or ephemeral runners without secrets, while privileged steps should remain separate and narrowly scoped. The same principle is captured in the CI/CD Security Tooling Buyer's Guide and the CI/CD Security Guide, both of which connect workflow analysis, runner monitoring, and control design to real pipeline risk.

External authority also helps frame the control problem: SLSA focuses attention on provenance and build integrity, while NIST Cybersecurity Framework 2.0 provides a broad structure for identifying, protecting, detecting, responding, and recovering around the pipeline as a business-critical asset.

Remediation, detection, and recovery after compromise

When poisoned pipeline execution is suspected, the response has to assume the pipeline itself may be contaminated. That means stopping the affected workflows, preserving logs and provenance evidence, reviewing recent workflow and script changes, and treating any secrets, tokens, or signing material touched by the pipeline as potentially exposed.

The recovery problem is broader than removing one malicious line. Teams often need to rotate credentials, rebuild from a trusted baseline, verify artifact integrity, and re-establish trust in the delivery chain. The CI/CD Pipeline Compromise Playbook is useful here because it ties triage to disabling workflows and runners, rotating secrets, and clean rebuilds.

For adversary mapping, MITRE ATT&CK T1677 Poisoned Pipeline Execution and the MITRE ATT&CK Enterprise Matrix help defenders connect pipeline abuse to execution, credential access, and post-compromise activity. Where build provenance is part of the recovery goal, SLSA is the clearest external reference for hardening build integrity.

Why this matters for delivery trust

Poisoned pipeline execution matters because modern software delivery treats the pipeline as a trusted producer of code, artifacts, and release metadata. Once that trust is subverted, downstream systems may consume tainted output without noticing, especially when the compromised job also signs, publishes, or packages release material.

The strongest control posture is to separate untrusted and privileged execution, minimise what pipeline jobs can reach, and verify every path where code can influence command execution. That is why pipeline security is not just a build-engine issue, but a release-trust issue that affects software supply chain integrity end to end.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and SLSA set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST CSF 2.0PR.AA-05 — Identity Management, Authentication, and Access ControlPoisoned pipelines hinge on controlling who can alter trusted build paths.
Recommendation — Restrict workflow and runner privileges so only approved changes can affect trusted pipeline execution.
NIST SP 800-53 Rev 5CM-3 — Configuration Change ControlPipeline files and referenced scripts are configuration that must be reviewed before execution.
IA-5 — Authenticator ManagementCompromised pipelines often expose tokens, keys, and other build credentials.
Recommendation — Enforce formal review and approval for pipeline and build-logic changes before they run. Rotate and manage pipeline credentials so exposed tokens cannot be reused after compromise.
SLSASupply-chain Levels for Software ArtifactsSLSA directly addresses build provenance and integrity, which poisoned pipelines undermine.
Recommendation — Adopt provenance and integrity controls so build outputs can be verified after pipeline execution.
MITRE ATT&CKT1677 — Poisoned Pipeline ExecutionThis is the ATT&CK technique for pipeline tampering that causes malicious execution.
Recommendation — Map detections and mitigations to T1677 to find suspicious workflow edits and execution paths.

Practitioner Guidance

Why practitioners should care: Treat pipeline edits, reusable workflows, and referenced scripts as privileged change points, because they can change what executes even when build infrastructure itself is not directly accessible. The practical question is whether the pipeline can run untrusted code without exposing secrets or release authority.

What to watch for: High-risk triggers, privileged pull-request paths, scripts built from untrusted input, and jobs that combine code execution with secret access deserve immediate scrutiny. A pipeline is safest when untrusted work is isolated and cannot inherit production-grade permissions.

Practitioner takeaway: The right default is to make the pipeline boring for attackers, isolate untrusted execution, and reserve secrets and signing authority for tightly controlled stages only.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org