Skip to content

Arbitrary File Write via artifact extraction

High
joshmgross published GHSA-6q32-hq47-5qq3 Sep 2, 2024

Package

npm @actions/artifact (npm)

Affected versions

>= 2.0.0, < 2.1.2

Patched versions

2.1.2

Description

Impact

Versions of actions/artifact before 2.1.2 are vulnerable to arbitrary file write when using downloadArtifactInternal, downloadArtifactPublic, or streamExtractExternal for extracting a specifically crafted artifact that contains path traversal filenames.

Patches

Upgrade to version 2.1.2 or higher.

References

CVE

CVE-2024-42471

Credits

Justin Taft from Google

Severity

High

CVE ID

CVE-2024-42471

Weaknesses

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Learn more on MITRE.