Skip to content
Path traversal Advisory Intermediate CVE-2023-22726

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.

Kwstubbs Follow

Originally disclosed on GitHub Security Lab

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.

Kwstubbs, on GitHub Security Lab

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

  1. Enable the artifact server by passing the --artifact-server-path parameter to act.
  2. Create a GitHub Action that writes a secret file.
  3. Use curl to upload the file to the /upload endpoint with a normal itemPath.
  4. 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.

More by Kwstubbs

View all

43 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.