CVE-2024-31991 Mealie vulnerable to a GET-based SSRF in recipe importer (GHSL-2023-225)

Medium 4.1 Published Updated

Authenticated users can exploit a Server-Side Request Forgery flaw to map internal HTTP servers on the local network via the recipe importer.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
None listed

What is CVE-2024-31991?

CVE-2024-31991 is a medium-severity server-side request forgery vulnerability in mealie-recipes mealie, published on 19 Apr 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

Mealie is a self hosted recipe manager and meal planner. Prior to 1.4.0, the safe_scrape_html function utilizes a user-controlled URL to issue a request to a remote server. Based on the content of the response, it will either parse the content or disregard it. This function, nor those that call it, add any restrictions on the URL that can be provided, nor is it restricted to being an FQDN (i.e., an IP address can be provided). As this function’s return will be handled differently by its caller depending on the response, it is possible for an attacker to use this functionality to positively identify HTTP(s) servers on the local network with any IP/port combination. This issue can result in any authenticated user being able to map HTTP servers on a local network that the Mealie service has access to. Note that by default any user can create an account on a Mealie server, and that the default [email protected] user is available with its hard-coded password. This vulnerability is fixed in 1.4.0.

Weakness: CWE-918

Which versions are affected by CVE-2024-31991?

It affects 1 product.

Products include Mealie Mealie.

How do I fix CVE-2024-31991?

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

Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.

Is CVE-2024-31991 being exploited?

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

Sources

Is CVE-2024-31991 in your software?

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

Check your SBOMs for free