Poisoned Pipeline / Techniques / T0234

T0234 · Initial Access · TA03 · observed in 1 incident(s)

Satisfy an over-broad OIDC trust policy

CI/CD Posture Cloud Security

Workload identity federates CI to cloud without stored keys: the pipeline
presents a signed token, the cloud exchanges it for short-lived
credentials, and the trust decision is a policy on the cloud side that
matches the token's subject, audience and claims. When that policy is
written too loosely — a wildcard in the repository or branch field, a
subject check against a claim the workflow can influence, an audience that
several tenants share, or a binding that admits any workflow in an
organisation — an attacker who can run a workflow inside that scope
inherits the deployment role without touching a secret.

The token is genuine and the exchange succeeds. Nothing is stolen and no
verification is bypassed, which is why this is easy to miss in an incident
review: the audit trail shows a correctly signed token being exchanged for
a correctly issued credential. What is wrong is the question the policy
answers — it decides whether the caller can prove it is a pipeline in this
organisation, when it needs to decide whether the caller is this
repository, on this branch, for this environment.

In a chain that starts with code execution inside a build, this is the step
that turns a build compromise into cloud access: the attacker reads the
pipeline configuration, finds a job whose identity has a cloud role
attached, and drives it, or presents a token from a workflow they control.
Because the resulting credential is short-lived, the useful work is done
immediately — enumerate the environment, read what is reachable, take what
is worth taking — rather than persisted.

Hardening is a policy review rather than a configuration change: pin the
subject to a repository and a ref, separate production roles from
pull-request and preview roles, keep the audience unique to the
deployment, and check at the receiving service what the exchanged
credential is allowed to reach.

Distinct from T0137, which is about weak authentication methods generally,
and from T0114, which is a compromised service account with stored
credentials. Here there is no stored credential at all.

Where this idea came from

Public incident / advisory

Same incident, second entry point. An erroneously defined OIDC binding in one cloud environment let the attacker exchange a genuine workload token for a short-lived cloud credential, which reached the internal credentials for the variable database and the SSH key for the orchestration fleet. Nothing was stolen and no verification was bypassed; the policy asked whether the caller was a pipeline in the organisation when it needed to ask whether it was this repository on this ref for this environment.

Mitigations

None linked yet.

Detections

None linked yet.

Observed in incidents (1)

References