Race condition in zenml
ZenML versions up to 0.55.3 allowed multiple users with the same username to be created when user-creation requests were sent in parallel. This could cause data inconsistencies and authentication problems, especially for APIs that use usernames as input parameters.
zenml-io/zenml
Originally disclosed on huntr
A race condition vulnerability exists in zenml-io/zenml versions up to and including 0.55.3, which allows for the creation of multiple users with the same username when requests are sent in parallel. This issue was fixed in version 0.55.5. The vulnerability arises due to insufficient handling of concurrent user creation requests, leading to data inconsistencies and potential authentication problems. Specifically, concurrent processes may overwrite or corrupt user data, complicating user identification and posing security risks. This issue is particularly concerning for APIs that rely on usernames as input parameters, such as PUT /api/v1/users/test_race, where it could lead to further complications.
From the GitHub Advisory Database (GHSA-c546-8jmq-hprj, CC BY 4.0).
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
Likely the user-creation endpoint checks for an existing username and then inserts the new user without an atomic constraint or lock, so parallel requests both pass the check.
Impact
An attacker could create duplicate usernames, leading to data inconsistencies and authentication problems for APIs that rely on usernames as input parameters.
What the attacker needed
Ability to send parallel requests; access to user-creation endpoint
The fix
The issue was fixed in version 0.55.5.
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 race condition happens when a program does two things at almost the same time and the result depends on which one finishes first. Here, if two account-creation requests arrive together, the system does not check properly, so two accounts can end up with the same username. That is a problem because later actions that look up a user by username may pick the wrong account.
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.