Join our Newsletter — 33% off our NHI Course

Version Pinning

Version pinning is the practice of fixing a dependency or package to a specific version instead of accepting automatic upgrades. It reduces unexpected changes and can block malicious or breaking updates, but it also delays fixes if not managed. Defenders should track pinned versions, review exceptions, and test updates before release.

What Version Pinning Changes in Software Supply Chains

Version pinning shifts dependency management from automatic change to deliberate control. That matters because software libraries, packages, and transitive dependencies can change behaviour, introduce regressions, or bring in unwanted code without warning.

It is most useful when teams need reproducible builds, stable releases, and a clear approval path for dependency updates. It also helps reduce exposure to malicious package updates and dependency confusion, but it should be balanced against the need to absorb security fixes in a timely way.

Why Teams Pin Versions Instead of Following the Latest Release

The main value of pinning is predictability. A build that resolves to the same dependency versions today and tomorrow is easier to test, troubleshoot, and reproduce after an incident. That is especially important in environments where a small upstream change can alter application logic, break integrations, or affect security controls.

Pinning is also a practical defence against supply-chain surprises. If a dependency is compromised, abandoned, or modified in a way that is incompatible with your application, a fixed version can prevent an immediate unwanted upgrade path. The trade-off is that a pinned dependency can also freeze known vulnerabilities in place if no one is actively managing exceptions and update windows.

For open source ecosystems, this control is closely tied to dependency hygiene, lockfiles, and review of package sources. NHIMG’s Open Source Security Guide covers pinning alongside SCA, SBOMs, trusted publishing, and open source risk management.

How to Check Exposure and Manage Pinned Dependencies

To assess exposure, organisations need a current inventory of what is pinned, where those pins live, and whether the dependency is direct or transitive. That review should include build files, lockfiles, container images, package managers, and any internal mirrors or artifact repositories that may preserve older versions longer than expected.

Exposure checks should also look at internet-facing services and build pipelines, because those are common places where malicious or accidental dependency changes can enter quickly. Vendor advisories, package ecosystem notices, and internal software composition analysis should be used together so that teams know whether a pin is shielding them from a bad update or trapping them on a risky one.

Pinning is strongest when exceptions are explicit and time-bound. A dependency that stays pinned indefinitely without review turns a stability control into technical debt.

Testing, Exceptions, and Release Discipline

Version pinning works best when update testing is part of the release process, not an afterthought. Teams should validate new versions in a controlled environment, compare behaviour against the pinned release, and only widen the allowed range when compatibility and security have been checked.

Exception handling matters because not every pin should be permanent. Some dependencies will need temporary holds while upstream fixes settle, while others should be repinned after a security review. The operational question is not whether to pin forever, but which versions are safe to hold, for how long, and under what approval process they may change.

That discipline is easier to sustain when package health, provenance, and dependency risk are already part of engineering review. The same controls that help spot unsafe open source dependencies also help decide when a pin should be kept, loosened, or retired.

Risk and Threat Considerations

Version pinning reduces change risk, but it can also create a false sense of safety if teams stop watching what they have frozen. A pinned dependency may keep working while quietly accumulating known vulnerabilities, and a long-lived pin can prevent urgent fixes from arriving automatically.

Failure mechanism: Attackers benefit when an organisation relies on stale pinned versions, because the dependency remains exposed until a human deliberately reviews, tests, and releases an update. The same mechanism can also appear when a malicious or broken package release is blocked by the pin, but the organisation never revisits the pin afterward.

Impact: The result can be compromised build integrity, delayed remediation, brittle deployments, or a dependency chain that is harder to recover from when an upstream issue finally forces change.

Standards & Framework Alignment

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

SLSA, CIS Controls v8 and OWASP ASVS set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
SLSA Supply-chain provenance and integrity Version pinning is part of preserving reproducible, verifiable software inputs.
Recommendation — Use provenance checks and controlled dependency updates to keep pinned artifacts traceable and trustworthy.
CIS Controls v8 CIS-15 — Service Provider Management Pinned packages often depend on third-party suppliers and update channels that need oversight.
Recommendation — Review third-party dependency sources and update paths before allowing version changes into production.
OWASP ASVS V15 — Secure Coding and Architecture Stable, reviewed dependency versions support secure software design and change control.
Recommendation — Define dependency update rules and validate changed versions before release.

Practitioner Guidance

Why practitioners should care: Treat version pinning as a control that needs ownership, not just a build-setting preference. A pinned dependency should always have a reason, an owner, and a review date, because the security value comes from the discipline around the pin as much as from the pin itself.

What to watch for: Long-lived pins, repeated manual overrides, and update failures that never get revisited are signs that the dependency process has become stagnant. If a package stays pinned because “it still works,” the organisation may be carrying avoidable risk.