Prefect has an Authentication Middleware Bypass when URL paths are appended with 'health' or 'ready'
The authentication middleware exempted any URL path ending in 'health' or 'ready' from authentication checks. An attacker could create resources whose names end in those words and then access them without authentication, exposing sensitive data such as API keys and database credentials.
prefecthq/prefect
Originally disclosed on huntr
In version 3.6.19 of prefecthq/prefect, an authentication bypass vulnerability exists due to the improper handling of URL path exemptions for health check probes. Specifically, the authentication middleware exempts any URL path ending with 'health' or 'ready' from authentication checks. This allows an attacker to create resources with names ending in 'health' or 'ready' and access them without authentication. Affected endpoints include those for variables, flows, work pools, work queues, and deployments. This vulnerability can lead to unauthorized access to sensitive information, such as API keys and database credentials, stored in Prefect Variables.
From the GitHub Advisory Database (GHSA-c635-393c-hcx2, 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
Impact
An attacker could access affected endpoints without authentication and read sensitive information such as API keys and database credentials stored in Prefect Variables.
What the attacker needed
Ability to create resources with chosen names; resource name ends in 'health' or 'ready'
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 web application often has a security guard (middleware) that checks who you are before letting you see a page. Here the guard was told to skip the check for any address ending in the words 'health' or 'ready', because those are used for automated health checks. An attacker could give their own resource a name ending in one of those words, so the guard skipped the check and let them in without logging in.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.