A 2023 Docker build arg gave GitHub admin in 25 minutes
A GitHub token baked into a public Docker image in March 2023 still had admin on three repos in July 2026. Audit your image build history today.
A Docker build arg from March 2023 handed a security firm admin access to a live production GitHub organization three years later. Strix published the disclosure this week: they were evaluating Baseten for inference, pointed their agent at the public surface first, and had an admin-scoped GitHub personal access token in 25 minutes. The token was not in the code. It was in the image's build history metadata, where almost nobody looks.
What actually happened
Strix's write-up lays out a short chain with no exploit in it.
A Harbor container registry was reachable without authentication. They enumerated repositories, pulled the baseten/baseten-app image, and read its layer metadata. A RUN instruction had expanded $GITHUB_TOKEN directly into the layer's created_by field — the command string Docker records for every step and hands back to anyone who runs docker history.
The build step ran March 3, 2023. The token still worked in July 2026. It belonged to a basetenbot account with the repo scope, which meant admin and push on three repositories — the main product repo, the GitOps cluster deployment repo, and a Homebrew tap — plus read/write on private repos including a directory of customer-named subdirectories.
Strix stopped there. No clone, no push, no config change. They reported it at 11:10 PM on July 13; the registry project was private by the next morning, and Baseten confirmed critical severity and rotated the token at 4:34 PM on July 14. On Hacker News, Baseten's Philip Kiely confirmed the remediation and said their logs show the vulnerability was never exploited and no customer data was exposed.
The root cause is a documented Docker behavior, not a bug. ARG GITHUB_TOKEN followed by a RUN that references it writes the expanded value into image metadata that ships with the image.
Why build-time secrets matter for your business
The exposure outlives the engineer who created it. Whoever passed that token in 2023 solved a real problem — a build needed private dependencies. The token then sat in a published artifact for three years, surviving every code review, every rotation policy, and a SOC 2 audit, because it was never in the source tree that any of those things examine.
Your scanners are looking in the wrong place. Secret scanning on commits, pre-commit hooks, and .gitignore discipline are all upstream of this. The leak is in a build output. If you publish images anywhere public — Docker Hub, GHCR, a Harbor instance someone spun up — run docker history --no-trunc against them and read what comes back.
Scope is the thing you control. A repo-scoped PAT on a bot account is a skeleton key. Fine-grained tokens, per-repo read-only where possible, and short expiry turn a three-year incident into a one-week one.
The fix is one directive. Use a BuildKit secret mount: RUN --mount=type=secret,id=gh reads the value at build time and never persists it to a layer. That is the whole change.
Key takeaways
- A GitHub PAT expanded into a
RUNcommand on March 3, 2023 was still valid and admin-scoped in July 2026 - It was found in Docker image build-history metadata (
created_by), not in any source file - Scope was
repo: admin and push on the product repo, the GitOps deployment repo, and a Homebrew tap - Time from unauthenticated registry to admin credential: about 25 minutes
- Baseten rotated the token and locked the registry inside a day, and says logs show no exploitation and no customer data exposed
- Run
docker history --no-truncon every image you have ever published, including old tags - Replace build args with BuildKit secret mounts, and swap classic PATs for fine-grained, expiring tokens
Every image you shipped is still on a registry somewhere. We audit build pipelines for credentials that leaked into artifacts instead of commits, then rebuild them with secret mounts, scoped tokens, and rotation that actually runs. See how we harden a build pipeline, or send us a Dockerfile and we will tell you what it publishes.
Sources: Strix disclosure, Baseten response on Hacker News.
- #docker
- #supply-chain
- #secrets
- #github
- #devops
Tommy Rush — Founder, Rush Commerce
Operator turned builder. 15+ years running operations — now shipping the systems businesses run on. More
Get The Rush Report weekly — one email, zero fluff.
Keep reading
Pixel modem zero-day: check the patch level, not the OS
Google shipped the September Pixel update on September 16 with CVE-2026-58704, a modem flaw under limited targeted exploitation. The fix is patch level 2026-09-05.
Read itVite dev servers CVE-2026-39364: scanned for cloud keys
F5 Labs logged 807 attacks on exposed Vite dev servers in August. CVE-2026-39364 reads .env files, AWS credentials, and Terraform state. Bind to localhost.
Read it