CVE-2024-31218 Missing Authentication for Critical Function in Webhood backend

Critical 9.8 Published Updated

Unauthenticated attackers can create admin accounts in Webhood deployments lacking existing admins, leading to full system compromise.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2024-31218?

CVE-2024-31218 is a critical missing authorization vulnerability in webhood-io webhood, published on 5 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Webhood is a self-hosted URL scanner used analyzing phishing and malicious sites. Webhood's backend container images in versions 0.9.0 and earlier are subject to Missing Authentication for Critical Function vulnerability. This vulnerability allows an unauthenticated attacker to send a HTTP request to the database (Pocketbase) admin API to create an admin account. The Pocketbase admin API does not check for authentication/authorization when creating an admin account when no admin accounts have been added. In its default deployment, Webhood does not create a database admin account. Therefore, unless users have manually created an admin account in the database, an admin account will not exist in the deployment and the deployment is vulnerable. Versions starting from 0.9.1 are patched. The patch creates a randomly generated admin account if admin accounts have not already been created i.e. the vulnerability is exploitable in the deployment. As a workaround, users can disable access to URL path starting with `/api/admins` entirely. With this workaround, the vulnerability is not exploitable via network.

Weakness: CWE-306

Which versions are affected by CVE-2024-31218?

How do I fix CVE-2024-31218?

No fix has been published for CVE-2024-31218 yet. Limit exposure of the affected software until one is available.

Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.

Is CVE-2024-31218 being exploited?

There is no known exploitation of CVE-2024-31218 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-h533-rxhm-73j2.

Is CVE-2024-31218 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free