Unpinned Container Image Tags

Workloads reference container images by mutable tags such as latest rather than by digest, so the code that runs can change without review.

SeverityLow
CVSS 3.13.3 CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:N Open in the calculator
CVSS 4.02.1 CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-494: Download of Code Without Integrity Check
OWASP Top 10A08:2025 Software or Data Integrity Failures
MITRE ATT&CKT1525 Implant Internal Image, T1195.002 Compromise Software Supply Chain
CategorySecurity Misconfiguration

Description

A container image reference such as nginx:latest or app:1.4 names a tag, which the registry maps to an image and which can be moved to a different image at any time. Only a digest reference, @sha256: followed by the image's hash, identifies one exact, immutable image. When a pod specification gives no tag, latest is used, and Kubernetes then checks the registry for a newer image every time a container starts.

With mutable tags, the code that runs depends on when each node pulled the image: different nodes can run different versions of the same workload, a rollback may not restore the previous code, and it is harder to establish which code was running at the time of an incident. The weakness does not let an attacker in by itself, but a change pushed to the tag, whether a routine upstream update, a mistake or a malicious push, reaches production on the next restart without passing through review. Anyone who gains the ability to push to a tag the cluster uses, in the organisation's registry or an upstream public repository, can therefore have their image run in the cluster without any deployment change, and unreviewed upstream updates can introduce vulnerabilities or break workloads.

The same applies to FROM lines in Dockerfiles. The issue is identified by reviewing image references in manifests, Helm charts and Dockerfiles for tags without digests, particularly latest.

Remediation

  • Reference images by digest in production manifests, optionally keeping the tag for readability in the form name:tag@sha256: followed by the digest, and have the CI/CD pipeline resolve and update digests when it deploys a new version.
  • Pin base images in Dockerfiles by digest as well, and update them deliberately, for example through automated pull requests, so that updates are reviewed and tested.
  • Never deploy latest to production; use unique version tags and enable tag immutability in the registry where it is supported.
  • Restrict who can push to production repositories, and verify image signatures at admission where images are signed.

Confirm the fix by checking that every image reference in the deployed manifests includes a digest.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Containers and Kubernetes Findings

Every Containers and Kubernetes finding