Tackling Cve 2021 41277 Using A Vulnerability Database
Metabase's custom GeoJSON map feature did not validate URLs before loading them, allowing an attacker to read local files such as /etc/passwd. The article describes using a vulnerability database and Shodan to find and test vulnerable servers.
In this article, I’ll talk about a security vulnerability (CVE-2021–41277), which has been popular in the InfoSec committee recently. I’ll also talk about a popular security vulnerability database, the WhiteSource Vulnerability Database.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could read sensitive files on the server, including environment variables, which may expose credentials.
What the attacker needed
Target runs an affected Metabase version; network access to the Metabase instance
The fix
The issue was fixed in Metabase versions 0.40.5 and 1.40.5 and later; as a workaround, a reverse proxy, load balancer or WAF could filter requests.
How it was found
- Search Shodan for Metabase servers using keywords such as the product name, a cookie name, or the page title.
- Review the Shodan results to pick candidate targets.
- Send a request to the GeoJSON endpoint with a file path as the URL parameter.
- Check the response for file contents, for example by searching for 'root:'.
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 write-up has not been written yet. The Original tab links to the source.
Metabase is a tool for making charts and dashboards. Its map feature accepted a web address from the user and fetched it without checking where it pointed, so someone could ask it to read a file on the server instead of a map. That let them see private files like the list of user accounts.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.