# CVE-2021-41277: Metabase GeoJSON API Local File Inclusion

> Attackers can read server files and environment variables via unvalidated GeoJSON URLs in Metabase custom map settings.

- **Severity:** Critical 10.0 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L`)
- **Exploited in the wild:** Yes, since 12 Nov 2024 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 17 Nov 2021
- **Updated:** 7 Oct 2026
- **Also known as:** GHSA-w73v-6p7p-fpfr

## What is CVE-2021-41277?

CVE-2021-41277 is a critical path traversal vulnerability in metabase, published on 17 Nov 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Metabase is an open source data analytics platform. In affected versions a security issue has been discovered with the custom GeoJSON map (`admin->settings->maps->custom maps->add a map`) support and potential local file inclusion (including environment variables). URLs were not validated prior to being loaded. This issue is fixed in a new maintenance release (0.40.5 and 1.40.5), and any subsequent release after that. If you’re unable to upgrade immediately, you can mitigate this by including rules in your reverse proxy or load balancer or WAF to provide a validation filter before the application.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2021-41277?

It affects 1 product.


Products: Metabase Metabase.

## How do I fix CVE-2021-41277?

No fix has been published for CVE-2021-41277 yet. Limit exposure of the affected software until one is available. US federal agencies must fix it by 3 Dec 2024.

## Is CVE-2021-41277 being exploited?

Yes. Attackers have exploited CVE-2021-41277 in the wild since at least 12 Nov 2024.

Public exploit code:

- PoC for CVE-2021-41277 (github_poc): https://github.com/tahtaciburak/CVE-2021-41277
- https://github.com/zer0yu/CVE-2021-41277 (github_poc): https://github.com/zer0yu/CVE-2021-41277
- simple program for exploit metabase (github_poc): https://github.com/z3n70/CVE-2021-41277
- https://github.com/Vulnmachines/Metabase_CVE-2021-41277 (github_poc): https://github.com/Vulnmachines/Metabase_CVE-2021-41277
- CVE-2021-41277 can be extended to an SSRF  (github_poc): https://github.com/sasukeourad/CVE-2021-41277_SSRF
- MetaBase 任意文件读取 (github_poc): https://github.com/chengling-ing/CVE-2021-41277

## Other vulnerabilities in metabase

- [CVE-2026-72898](https://insights.sbomify.com/CVE-2026-72898/): Metabase SQL Injection (critical 10.0, exploited in the wild)
- [CVE-2026-50148](https://insights.sbomify.com/CVE-2026-50148/): Metabase: Remote Code Execution via Snowflake JDBC Driver Arbitrary File Write (critical 10.0)
- [CVE-2023-37470](https://insights.sbomify.com/CVE-2023-37470/): Metabase vulnerable to remote code execution via POST /api/setup/validate API endpoint (critical 10.0)
- [CVE-2026-59827](https://insights.sbomify.com/CVE-2026-59827/): Metabase: Unsafe Deserialization of H2 Query Results (critical 9.9)
- [CVE-2023-38646](https://insights.sbomify.com/CVE-2023-38646/): Command injection in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-41277 and fix it if it is affected.

What it is: CVE-2021-41277 is a critical path traversal vulnerability in metabase, published on 17 Nov 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2021-41277 in the wild since at least 12 Nov 2024.

Affected product: metabase. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-41277/ (Markdown: https://insights.sbomify.com/CVE-2021-41277/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-41277
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-41277
- OSV: https://osv.dev/vulnerability/CVE-2021-41277

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-41277/
Summaries are generated and may contain mistakes; the official description above is the record.
