A supply chain attack in which an attacker moves a repository tag after publication so the same version label resolves to different code. The version name appears familiar, but the underlying commit has changed, which breaks provenance assumptions and can redirect trusted updates to malicious artifacts.
What a tag rewrite attack is
A tag rewrite attack is a supply chain integrity failure where a published repository tag is moved to a different commit after release, so the same version label no longer points to the same code.
The danger is not just that a tag can change, but that consumers often trust the label as a stable reference for repeatable builds, provenance checks, and automated updates.
Why tag movement breaks trust in release provenance
Tags are meant to provide a human-friendly pointer to a release line, but they are not inherently immutable unless a project enforces that property. If a tag is repointed, the apparent version history becomes unreliable even when the version string has not changed.
That breaks the basic assumption behind source integrity, because the consumer believes they are retrieving a known release while actually resolving a different revision. In practice, this can invalidate SBOMs, signed attestations, cached build inputs, and vulnerability triage that depends on a fixed code baseline.
The issue is especially serious in systems that fetch code by tag rather than by commit hash. A stable release name can still hide a changed artifact, which makes later verification harder unless the exact commit digest was recorded separately.
Where the attack path creates supply chain exposure
Tag rewrite attacks exploit trust in naming conventions rather than breaking cryptography directly. If the surrounding release process does not lock tags, record immutable references, or verify that a tag has not moved, an attacker with repository write access can redirect consumers to malicious code while preserving the familiar release label.
This is a classic provenance gap: the consumer sees continuity, but the underlying object has changed. That can undermine build reproducibility, trusted update channels, and incident investigations because the original published state may no longer be recoverable from the tag alone.
In ecosystems that use automated dependency refresh or policy-based release promotion, the impact can spread quickly. A single rewritten tag can influence downstream builds, mirrors, packaging pipelines, and security tooling that keys off the visible version name.
How teams should think about release integrity
Defensive practice starts with treating tags as pointers, not proof. Teams should anchor release trust to immutable commit identifiers, signed releases, verified provenance metadata, and repository rules that prevent tag movement after publication.
Consumer-side controls matter too: build pipelines should record the resolved commit, compare expected and actual references, and reject unexpected tag drift. When a repository or package ecosystem allows mutable release labels, that behavior needs to be documented so integrators do not mistake convenience for integrity.
Risk and Threat Considerations
Tag rewrite attacks create a direct integrity and trust risk because they can silently change what a supposedly fixed version means. The same label may later resolve to altered code, which can bypass review assumptions, weaken incident forensics, and expose downstream consumers to malicious updates.
Failure mechanism: An attacker or insider with tag write capability repoints a release tag after it has been trusted, so consumers and automation retrieve a different commit than the one originally published.
Impact: Release provenance becomes unreliable, reproducible builds can break, and malicious code may be delivered through an update path that still appears legitimate.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
SLSA, NIST CSF 2.0 and CIS Controls v8 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| SLSA | Supply Chain Levels for Software Artifacts | Tag rewrites undermine artifact provenance and build integrity. |
| Recommendation — Pin builds to immutable commit or artifact references and verify provenance before promotion. | ||
| NIST CSF 2.0 | PR.DS-10 — Integrity Verification | Tag rewrites alter trusted source references and threaten integrity. |
| GV.SC-08 — Supply Chain Risk Management | Mutable release tags create supplier and provenance risk in software supply chains. | |
| Recommendation — Verify source references and release integrity before consuming tagged code. Require immutable release references in supplier and dependency controls. | ||
| CIS Controls v8 | CIS-16 — Application Software Security | Secure software delivery depends on controlling release integrity and provenance. |
| Recommendation — Enforce protected release workflows and verify source integrity in delivery pipelines. | ||
| ISO/IEC 27001:2022 | A.8.9 — Configuration management | Tag movement is a configuration integrity issue for release artifacts. |
| Recommendation — Protect release metadata from unauthorized change and track approved revisions. | ||
Practitioner Guidance
Why practitioners should care: The practical question is not whether a tag is convenient, but whether it is safe to use as a release anchor. If your pipeline or dependency workflow treats tags as immutable, you are inheriting a control assumption that may not exist.
What to watch for: Any workflow that consumes code by tag, especially when the commit hash is not captured, verified, or pinned in build metadata. Treat unexpected tag movement as a provenance event, not a cosmetic repository change.
Practitioner takeaway: Make the commit the source of truth, and use the tag only as a human-readable release label.
Related resources from NHI Mgmt Group
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 October 12, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org