GHSL-2023-004: Arbitrary file upload and download in act - CVE-2023-22726
The artifact server in act does not sanitise path inputs, allowing an attacker to upload and download arbitrary files on the host from a GitHub Action. This could lead to privilege escalation.
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.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
This issue may lead to privilege escalation.
What the attacker needed
Artifact server enabled; ability to run a GitHub Action
The fix
The vulnerability was fixed by applying a patch.
How it was found
- Enable the artifact server by passing the --artifact-server-path parameter to act.
- Create a GitHub Action that writes a secret file.
- Use curl to upload the file to the /upload endpoint with a normal itemPath.
- Use curl to upload the file again with an itemPath containing ../ to write outside the artifact directory.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The artifact server is a small web service that saves files produced by GitHub Actions. It trusted the file path given by the user, so someone could use '..' to escape the intended folder and read or write any file on the machine. This is called path traversal.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.