Unpinned Third-Party Dependencies or Actions

Builds pull third-party actions, packages or images by mutable tags or version ranges, so a change by an upstream owner or attacker is used automatically without review.

SeverityMedium
CVSS 3.16.6 CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H Open in the calculator
CVSS 4.07.5 CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:H/VI:H/VA:H/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&CKT1195.001 Compromise Software Dependencies and Development Tools
CategorySecurity Misconfiguration

Description

The build references third-party code by a name that can be changed after the fact, rather than by an immutable identifier. In GitHub Actions and similar systems, workflows use actions by tag or branch, such as @v4 or @main, which the action's owner, or anyone who compromises the action's repository, can move to point at different code. Elsewhere, package manifests use version ranges without a committed lock file, install commands ignore the lock file, scripts download and run tools from a URL without checking a hash, and Dockerfiles build from base images by tag, such as latest.

Each build then runs whatever the upstream source provides at that moment. If an upstream project, its maintainer's account or its release process is compromised, the malicious version is pulled into the organisation's builds automatically, without any change in its own repositories, and runs with the build's secrets and permissions, including its access to source code and publishing rights, where it can steal credentials or insert malicious code into released software. This was shown in the compromise of the widely used tj-actions/changed-files action (CVE-2025-30066), in which an attacker repointed the action's existing version tags to a malicious commit that wrote CI/CD secrets to workflow logs, affecting workflows that ran the action by tag during that time.

Exploitation depends on an attacker first gaining control of an upstream component, which is outside the organisation's control and not an everyday event, but such compromises do happen and affect every consumer at once. Unpinned references also make builds unreproducible, so it is hard to establish afterwards exactly what code ran.

The weakness is identified by reviewing workflow files, manifests, lock files, Dockerfiles and build scripts for references that are not pinned to a full commit SHA, an exact version with an integrity hash or an image digest. Container image tags in deployment manifests are covered by a separate finding.

Remediation

Pin every third-party reference to an immutable identifier, and update it deliberately:

  • Reference GitHub Actions and similar reusable workflow components by full-length commit SHA, with the version in a comment for readability, and turn on any policy setting the platform offers that requires SHA pinning.
  • Commit lock files with integrity hashes for every package manager, and install with commands that fail if the lock file does not match, such as npm ci, pip install --require-hashes or dotnet restore --locked-mode.
  • Pin base images in Dockerfiles by digest rather than by tag, and verify the checksum or signature of any tool downloaded during the build.
  • Use an automated dependency update tool to propose updates to pinned versions as reviewable pull requests, so that pinning does not leave components out of date.
  • Prefer actions and packages from verified, well-maintained publishers, and copy critical third-party actions into the organisation's own repositories where practical.

Confirm the fix by reviewing workflows, manifests and Dockerfiles for remaining mutable references, and by checking that builds fail when a lock file or hash does not match.

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 Source Code and Supply Chain Findings

Every Source Code and Supply Chain finding