Artifact cache poisoning is the tampering of a build or package cache so a later process retrieves malicious or incorrect artefacts. It targets shared caches in CI, package managers or content delivery layers, letting an attacker influence what gets installed, built or deployed without changing the original source.
How artifact cache poisoning works
Artifact cache poisoning happens when an attacker tampers with a cache that later build, test, or deployment steps trust. The cache may hold packages, compiled outputs, dependency archives, or other artefacts reused for speed. The danger is not just corruption, but reuse of malicious content that appears to come from a normal pipeline path.
This is most dangerous where cache hits are treated as routine and do not receive the same scrutiny as fresh downloads. If cache keys are weak, shared across unrelated jobs, or influenced by untrusted inputs, poisoned artefacts can survive long enough to affect many downstream builds before anyone notices.
Where the attack path usually appears
Artifact cache poisoning often shows up in CI pipelines, package manager caches, container and artefact registries, and content delivery layers. In each case, the attacker is trying to influence what the next consumer retrieves, rather than replacing the original source code itself. That makes the issue especially effective against systems that optimise for speed and repeatability.
The attack path is often indirect: a poisoned cache entry is created once, then consumed repeatedly by later jobs or deploys. The risk increases when build systems mix trusted and untrusted workflows, when artefacts are fetched from shared infrastructure, or when integrity checks only validate the original source but not the cached object that actually gets used.
Why poisoned caches are dangerous
Cache poisoning can silently change the behaviour of software without an obvious source-control change. That can produce malicious binaries, altered dependencies, or incorrect configuration artefacts that look valid at the point of use. Because the compromise rides through an efficiency mechanism, it can bypass assumptions that “nothing changed” in the upstream repository.
For supply chains, the core problem is trust transitivity: once a cache is accepted as authoritative, every consumer inherits that trust. A poisoned build cache can therefore become a distribution channel for malware, backdoors, data exfiltration logic, or simply broken artefacts that undermine release integrity and rollback confidence.
How to reduce exposure and verify integrity
Exposure review starts with inventorying which caches are shared, which jobs can write to them, and whether untrusted inputs can shape cache keys or stored artefacts. Review vendor and platform guidance for cache semantics, invalidation, and trust boundaries, especially where build acceleration is enabled across branches, forks, tenants, or environments. Web Cache Poisoning and Cache Deception Guide is useful here because the same cache-key and trust-boundary mistakes often reappear in CI and delivery systems.
Integrity verification should not rely on the cache alone. Validate artefacts by digest, signature, or provenance where available, and compare what was retrieved with what was expected. For broader supply-chain controls, SLSA helps frame why provenance and build integrity matter when a cached object may be reused long after the original build event. SLSA is a useful reference point for that control model.
Detection, response, and recovery
Detection is strongest when build logs, cache access logs, and artefact metadata are correlated. Look for unexpected cache hits, unusual cache invalidations, artefacts that do not match the expected digest, or downstream jobs consuming objects that were never produced by the normal pipeline path. If a cache is suspected to be poisoned, assume any repeated consumer may have inherited the contamination.
Response usually requires purging the affected cache, rebuilding from trusted sources, and validating downstream artefacts again before release. Where the poisoned object was distributed further, organisations may need to treat it as a supply-chain incident and review whether signing keys, publishing credentials, or deployment tokens were exposed or abused during the compromise.
Risk and Threat Considerations
Artifact cache poisoning is attractive because it turns a performance feature into a persistence mechanism. An attacker who controls or influences a shared cache can spread malicious artefacts without touching the primary source tree, which makes the compromise harder to spot and easier to reuse across many builds.
Failure mechanism: A weak cache boundary, untrusted write path, or inadequate integrity check allows a malicious artefact to be stored once and then served repeatedly as if it were legitimate.
Impact: Organisations may deploy tampered packages, poisoned build outputs, or incorrect dependencies, creating supply-chain compromise, release integrity failures, and possible credential or token exposure during follow-on investigation.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
SLSA, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| SLSA | Supply-chain Levels for Software Artifacts | Artifact cache poisoning directly threatens build provenance and artefact integrity. |
| Recommendation — Require provenance and integrity checks before promoting cached artefacts into release paths. | ||
| NIST SP 800-53 Rev 5 | SI-7 — Software, Firmware, and Information Integrity | Poisoned cache artefacts are an integrity failure in the software supply path. |
| CM-3 — Configuration Change Control | Cache rules and trust boundaries must be controlled to prevent unsafe changes. | |
| Recommendation — Verify cached artefacts with integrity controls before build or deploy consumption. Approve and document cache configuration changes that affect build trust and reuse. | ||
| CIS Controls v8 | CIS-16 — Application Software Security | Build and dependency handling in pipelines needs secure software practices. |
| Recommendation — Apply secure software practices to validate dependencies, artefacts, and pipeline reuse paths. | ||
Practitioner Guidance
Why practitioners should care: Treat every cache that influences build, packaging, or deployment output as part of the trust boundary, not as a harmless optimisation layer. If a cache can change what ships, it can also change what defenders think was shipped.
What to watch for: Watch for shared caches writable by multiple trust zones, cache keys derived from untrusted input, and “successful” rebuilds that produce artefacts whose digests or provenance no longer match the expected source path.
Practitioner takeaway: The safest assumption is that a cache is only trustworthy when its population rules, invalidation logic, and artefact integrity checks are all explicit and independently verifiable.
Related resources from NHI Mgmt Group
- How should security teams test whether a cache key is safe from poisoning in practice?
- What do teams get wrong about detecting cache poisoning and related cache key flaws?
- What happens when a cache poisoning flaw is chained with a reflected client-side gadget?
- What should security teams do first when auditing for web cache poisoning risk?
Deepen Your Knowledge
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.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org