Vulnerability · Published Jan 20, 2023 · Assigned by GitHub_M
CVE-2023-22726Unrestricted file upload leading to privilege escalation in act
High 8.0
In plain English
A high-severity unrestricted file upload in act from nektos. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.3% (higher than 70% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
act is a project which allows for local running of github actions. The artifact server that stores artifacts from Github Action runs does not sanitize path inputs. This allows an attacker to download and overwrite arbitrary files on the host from a Github Action. This issue may lead to privilege escalation. The /upload endpoint is vulnerable to path traversal as filepath is user controlled, and ultimately flows into os.Mkdir and os.Open. The /artifact endpoint is vulnerable to path traversal as the path is variable is user controlled, and the specified file is ultimately returned by the server. This has been addressed in version 0.2.40. Users are advised to upgrade. Users unable to upgrade may, during implementation of Open and OpenAtEnd for FS, ensure to use ValidPath() to check against path traversal or clean the user-provided paths manually.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/nektos/act | 0.2.40 | GHSA-pc99-qmg4-rcff |
| Go | github.com/nektos/act | 0.2.40 | GO-2023-1504 |
Affected products (as reported)
Weakness: CWE-434 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/nektos/act/security/advisories/GHSA-pc99-qmg4-rcff x_refsource_CONFIRM
- https://github.com/nektos/act/issues/1553 x_refsource_MISC
- https://github.com/nektos/act/commit/63ae215071f94569d910964bdee866d91d6e3a10 x_refsource_MISC
- https://github.com/nektos/act/blob/master/pkg/artifacts/server.go#L65 x_refsource_MISC
- https://github.com/nektos/act/blob/v0.2.35/pkg/artifacts/server.go#L245 x_refsource_MISC
- https://github.com/nektos/act/blob/v0.2.35/pkg/artifacts/server.go#LL103C2-L103C2 x_refsource_MISC
- https://securitylab.github.com/advisories/GHSL-2023-004_act/ x_refsource_MISC