GHSL-2026-203: Same-second TOCTOU vulnerability in jupyterlab/maintainer-tools update-snapshots-checkout - CVE-2026-84973
The update-snapshots-checkout action compared the pull request head repository's pushed_at timestamp with the triggering comment's created_at timestamp using strict greater-than, but both timestamps have one-second precision. An attacker could push a malicious commit in the same second as an authorised comment, causing the timestamps to compare equal and the action to check out the attacker-controlled commit, which a consuming workflow might then execute.
Versions of the jupyterlab/maintainer-tools update-snapshots-checkout action before 1.0.0 contain a time-of-check-to-time-of-use (TOCTOU) vulnerability. The action attempts to reject pull request updates made after an authorized snapshot-update comment by comparing the pull request head repository’s pushedat 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 action used a strict greater-than comparison on one-second-precision timestamps, so a push in the same second as the authorised comment was treated as not later and was accepted.
Impact
Successful exploitation could give the external pull request author control of the commit checked out by a consuming workflow, and if that workflow executes code from the checkout, the attacker could gain arbitrary code execution in the job and access credentials and secrets available to that code; the race remains unreliable because of the one-second timestamp granularity.
What the attacker needed
External contributor can open a pull request; a maintainer comments 'please update snapshots'; attacker can push in the same second as the comment; consuming workflow executes code from checkout
The fix
The action was fixed in v1.0.0, and the advisory was published.
How it was found
- An external contributor opens a pull request whose current head appears suitable for snapshot generation.
- An OWNER, COLLABORATOR, or MEMBER creates a comment containing 'please update snapshots'.
- The attacker uses an automated script to poll for new comments and pushes a malicious commit in the same second as that comment.
- When the job fetches the pull request, it observes the malicious head; the push and comment timestamps compare equal, so the guard accepts the update and records the malicious SHA.
- The checkout matches that recorded SHA, passes the later equality check, and the workflow executes the attacker-controlled local action and package scripts with the job's write-scoped token.
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.
This is a race condition in a GitHub Action. The action tries to make sure that a pull request has not been changed after a trusted maintainer asked for snapshots to be updated. It does this by comparing two timestamps, but those timestamps only record whole seconds. If an attacker pushes a new commit in the same second as the maintainer's comment, the action cannot tell the difference and accepts the new commit. If the workflow then runs code from that commit, the attacker's code runs with the workflow's permissions.
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.