GHSA-5xr6-xhww-33m4: Dawidd6/action download artifact Artifact Poisoning Vulnerability Vulnerability

HIGH
CWE-349
Published
Advisory Summary

GHSA-5xr6-xhww-33m4 is a HIGH artifact poisoning vulnerability vulnerability (CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data) affecting Dawidd6/action download artifact libraries in the GitHub Actions ecosystem. The issue involves artifact poisoning vulnerability in action-download-artifact v5 and earlier. Remediation is available by upgrading affected packages to version 6.

GHSA-5xr6-xhww-33m4 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-5xr6-xhww-33m4
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data
Affected Product Dawidd6/action download artifact
Package Ecosystem GitHub Actions
Published Date
Last Updated

How to Fix GHSA-5xr6-xhww-33m4

To remediate this vulnerability, upgrade all affected Dawidd6/action download artifact dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

dawidd6/action-download-artifact fixed: 6
Upgrade dawidd6/action-download-artifact to 6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for dawidd6/action-download-artifact

How to Check if You Are Affected

To determine whether your application is affected by GHSA-5xr6-xhww-33m4, inspect your project dependencies for Dawidd6/action download artifact:

inspect dependencies for dawidd6/action-download-artifact

Analyze the terminal output to locate any version of Dawidd6/action download artifact in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data, where the product, when processing trusted data, accepts any untrusted data that is also included with the trusted data, treating the untrusted data as if it were trusted. In Dawidd6/action download artifact, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary In versions of `dawidd6/action-download-artifact` before v6, a repository's forks were also searched by default when attempting to find matching artifacts. This could be exploited by an unprivileged attacker to introduce compromised artifacts (such as malicious executables) into a privileged workflow context, as creating a fork requires no privileges. Users should immediately upgrade to v6 or newer, which changes the default behavior to avoid searching forks for matching artifacts. Users who cannot upgrade should explicitly set `allow_forks: false` to disable searching forks for artifacts. ### Details GitHub's artifact storage for workflows does not natively distinguish between artifacts created by a repository and artifacts created by forks of that repository. As a result, attempting to retrieve the "latest" artifact for a workflow run can return artifacts produced by a fork, rather than its upstream. Because any GitHub user can create a fork of a public repository, this allows for artifact poisoning in the following scenarios (as well as potentially others): 1. Repository `alice/foo` runs `build.yml`, producing `build.exe` 2. Repository `alice/foo` runs `publish.yml`, which uses `action-download-artifact@v5` to retrieve the latest `build.exe` from `build.yml` To compromise `publish.yml` in this scenario, Mallory forks `alice/foo` to `mallory/foo`, and then modifies `build.yml` to produce a compromised `build.exe`. Mallory can then repeatedly trigger their copy of `build.yml` to ensure that their compromised `build.exe` is always the latest artifact, meaning that Alice's `publish.yml` will retrieve it. Additional details on this vulnerability can be found in this blog post from 2022: * https://www.legitsecurity.com/blog/artifact-poisoning-vulnerability-discovered-in-rust ### Impact This vulnerability impacts all repositories on GitHub that use `action-download-artifacts@v5` or older and do **not** disable `allow_forks: true`, which is the default. If a repository is affected, the severity ranges from downstream contamination (such as publishing attacker-controlled artifacts) to direct workflow compromise (if the retrieved artifact is then executed in a privileged workflow context, such as `push` or `pull_request_target`).

GHSA-5xr6-xhww-33m4 Affected Dawidd6/action download artifact Versions

1 component(s)
Fixed Versions:
6
Product / Package Ecosystem Affected Versions Fixed Version
dawidd6/action-download-artifact
GitHub Actions
< 6
6

References

Frequently Asked Questions

What is GHSA-5xr6-xhww-33m4?
GHSA-5xr6-xhww-33m4 is a security vulnerability in Dawidd6/action download artifact involving Artifact poisoning vulnerability in action-download-artifact v5 and earlier under CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data.
Which Dawidd6/action download artifact versions are affected?
Affected versions include releases prior to 6 across affected packages: dawidd6/action-download-artifact.
What version fixes GHSA-5xr6-xhww-33m4?
Upgrading to 6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is dawidd6/action-download-artifact affected?
Yes, dawidd6/action-download-artifact is affected in releases prior to 6. Upgrade your dependency to 6 or later.
What CWE is associated with GHSA-5xr6-xhww-33m4?
GHSA-5xr6-xhww-33m4 is classified under CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data (The product, when processing trusted data, accepts any untrusted data that is also included with the trusted data, treating the untrusted data as if it were trusted.).
How can I check GitHub Actions dependencies for GHSA-5xr6-xhww-33m4?
Run the dependency tree command: 'inspect dependencies for dawidd6/action-download-artifact'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5xr6-xhww-33m4",
  "modified" : "2024-11-25T15:26:43Z",
  "published" : "2024-11-25T15:26:43Z",
  "aliases" : [ ],
  "summary" : "Artifact poisoning vulnerability in action-download-artifact v5 and earlier",
  "details" : "### Summary\n\nIn versions of `dawidd6/action-download-artifact` before v6, a repository's forks were also searched by default when attempting to find matching artifacts. This could be exploited by an unprivileged attacker to introduce compromised artifacts (such as malicious executables) into a privileged workflow context, as creating a fork requires no privileges.\n\nUsers should immediately upgrade to v6 or newer, which changes the default behavior to avoid searching forks for matching artifacts. Users who cannot upgrade should explicitly set `allow_forks: false` to disable searching forks for artifacts.\n\n### Details\n\nGitHub's artifact storage for workflows does not natively distinguish between artifacts created by a repository and artifacts created by forks of that repository. As a result, attempting to retrieve the \"latest\" artifact for a workflow run can return artifacts produced by a fork, rather than its upstream. \n\nBecause any GitHub user can create a fork of a public repository, this allows for artifact poisoning in the following scenarios (as well as potentially others):\n\n1. Repository `alice/foo` runs `build.yml`, producing `build.exe`\n2. Repository `alice/foo` runs `publish.yml`, which uses `action-download-artifact@v5` to retrieve the latest `build.exe` from `build.yml`\n\nTo compromise `publish.yml` in this scenario, Mallory forks `alice/foo` to `mallory/foo`, and then modifies `build.yml` to produce a compromised `build.exe`. Mallory can then repeatedly trigger their copy of `build.yml` to ensure that their compromised `build.exe` is always the latest artifact, meaning that Alice's `publish.yml` will retrieve it.\n\nAdditional details on this vulnerability can be found in this blog post from 2022:\n\n* https://www.legitsecurity.com/blog/artifact-poisoning-vulnerability-discovered-in-rust\n\n### Impact\n\nThis vulnerability impacts all repositories on GitHub that use `action-download-artifacts@v5` or older and do **not** disable `allow_forks: true`, which is the default.\n\nIf a repository is affected, the severity ranges from downstream contamination (such as publishing attacker-controlled artifacts) to direct workflow compromise (if the retrieved artifact is then executed in a privileged workflow context, such as `push` or `pull_request_target`).\n",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "GitHub Actions",
      "name" : "dawidd6/action-download-artifact"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/dawidd6/action-download-artifact/security/advisories/GHSA-5xr6-xhww-33m4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dawidd6/action-download-artifact/commit/bf251b5aa9c2f7eeb574a96ee720e24f801b7c11"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dawidd6/action-download-artifact"
  }, {
    "type" : "WEB",
    "url" : "https://www.legitsecurity.com/blog/artifact-poisoning-vulnerability-discovered-in-rust"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-349" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-25T15:26:43Z",
    "nvd_published_at" : null
  }
}