GHSL-2026-226: TOCTOU in the Marimo test release workflow
The marimo bot workflow authorised a test release from a maintainer comment but checked the pull request head timestamp against the comment timestamp with one-second precision and a strict greater-than comparison, so a push in the same second was accepted. A pull request author could win that race to have their commit checked out and built, then have attacker-controlled wheel and frontend artifacts published to TestPyPI and npm.
The marimo bot workflow lets an authorized maintainer start a test release from a pull request comment. It tries to reject pull request updates made after that comment by comparing the head repository’s pushedat timestamp with the comment’s createdat timestamp.
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
Root cause
The workflow used a one-second-precision timestamp comparison with a strict greater-than check to bind authorisation to a commit, so an equal timestamp was treated as not later and the attacker's push was accepted.
Impact
An external pull request author who wins the race gains code execution in the release job and can publish attacker-chosen content to TestPyPI and npm, with npm additionally running lifecycle scripts in a job holding id-token write; TestPyPI publication may require approval if its environment has required reviewers.
What the attacker needed
External contributor can open a pull request; maintainer comments the release command; attacker pushes in the same second
The fix
The vulnerable workflow was deleted.
How it was found
- An external contributor opens a pull request whose head looks appropriate for a test release.
- A maintainer comments the test release command on the pull request.
- The attacker polls for the comment and pushes a malicious commit in the same second it is created.
- The job reads the pull request after the push; the timestamps compare equal and the malicious SHA is checked out.
- The attacker's local action and build scripts run, and the poisoned artifacts flow to the TestPyPI and npm publishing jobs.
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.
A workflow is an automated script that runs on GitHub when something happens, here when someone comments a command. The script tried to make sure the pull request had not changed since the comment, but it compared times only to the nearest second, so a change made in the same second slipped through. The attacker's code then ran and their files were published as packages.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.