{"id":"CVE-2024-39699","aliases":["CVE-2024-39699","GHSA-8p72-rcq4-h6pw"],"related":[],"kind":"vulnerability","state":"published","title":"Directus has a Blind SSRF On File Import","summary":"Directus is a real-time API and App dashboard for managing SQL database content. There was already a reported SSRF vulnerability via file import. It was fixed by resolving all DNS names and checking if the requested IP is an internal IP address. However it is possible to bypass this security measure and execute a SSRF using redirects. Directus allows redirects when importing file from the URL and does not check the result URL. Thus, it is possible to execute a request to an internal IP, for example to 127.0.0.1. However, it is blind SSRF, because Directus also uses response interception technique to get the information about the connect from the socket directly and it does not show a response if the IP address is internal. This vulnerability is fixed in 10.9.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Directus is a real-time API and App dashboard for managing SQL database content. There was already a reported SSRF vulnerability via file import. It was fixed by resolving all DNS names and checking if the requested IP is an internal IP address. However it is possible to bypass this security measure and execute a SSRF using redirects. Directus allows redirects when importing file from the URL and does not check the result URL. Thus, it is possible to execute a request to an internal IP, for example to 127.0.0.1. However, it is blind SSRF, because Directus also uses response interception technique to get the information about the connect from the socket directly and it does not show a response if the IP address is internal. This vulnerability is fixed in 10.9.3.","source":"cvelist"},{"lang":"en","text":"### Summary\nThere was already a reported SSRF vulnerability via file import. [https://github.com/directus/directus/security/advisories/GHSA-j3rg-3rgm-537h](https://github.com/directus/directus/security/advisories/GHSA-j3rg-3rgm-537h)\nIt was fixed by resolving all DNS names and checking if the requested IP is an internal IP address. \n\nHowever it is possible to bypass this security measure and execute a SSRF using redirects. Directus allows redirects when importing file from the URL and does not check the result URL. Thus, it is possible to execute a request to an internal IP, for example to 127.0.0.1.\n\nHowever, it is blind SSRF, because Directus also uses response interception technique to get the information about the connect from the socket directly and it does not show a response if the IP address is internal (nice fix, by the way :) ).\n\nBut the blindness does not fully mitigate the impact of the vulnerability. The blind SSRF is still exploitable in the real life scenarios, because there could be a vulnerable software inside of the network which can be exploited with GET request. I will show the example in the PoC. Also, you can check [HackTricks](https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery/ssrf-vulnerable-platforms) page with some known cases. \n\n### Details\n_Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer._\n\n### PoC\nFor testing I used the docker compose with the latest directus version. Here is my docker compose file\n```\nversion: \"3\"\nservices:\n  directus:\n    image: directus/directus:10.8.3\n    ports:\n      - 8055:8055\n    volumes:\n      - ./database:/directus/database\n      - ./uploads:/directus/uploads\n      - ./extensions:/directus/extensions\n    environment:\n      KEY: \"redacted\"\n      SECRET: \"redacted\"\n      ADMIN_EMAIL: \"admin@example.com\"\n      ADMIN_PASSWORD: \"redacted\"\n      DB_CLIENT: \"sqlite3\"\n      DB_FILENAME: \"/directus/database/data.db\"\n```\n\nAs a first step it is needed to setup a redirect server which will redirect the incoming request to some internal URL. I did it on my VPS with the public IP.\n\n<img width=\"1035\" alt=\"image\" src=\"https://user-images.githubusercontent.com/156416961/296198555-870898b2-7b8a-4857-a8fe-5e28e85241b0.png\">\n\nAfter it I setup a simple HTTP Server emulating the vulnerable application inside the internal network. It just execute any shell command provided in the cmd GET-parameter.\n\n<img width=\"454\" alt=\"image\" src=\"https://user-images.githubusercontent.com/156416961/296198963-4465fa15-c6d6-4e8c-92a0-a2ae334ba79f.png\">\n\nAfter it the directus import functionality was used \n\n<img width=\"930\" alt=\"image\" src=\"https://user-images.githubusercontent.com/156416961/296199457-d5d8eb2d-1ca8-442e-b1bf-15ddb0f1947d.png\">\n\nIt initiates the following HTTP request\n\n```\nPOST /files/import HTTP/1.1\nHost: 127.0.0.1:8055\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0\nAccept: application/json, text/plain, */*\nAccept-Language: en-US,en;q=0.5\nAccept-Encoding: gzip, deflate, br\nAuthorization: Bearer redacteed\nContent-Type: application/json\nContent-Length: 44\nOrigin: http://127.0.0.1:8055\nConnection: close\nReferer: http://127.0.0.1:8055/admin/files/+\nCookie: directus_refresh_token=redacted\nSec-Fetch-Dest: empty\nSec-Fetch-Mode: cors\nSec-Fetch-Site: same-origin\n\n{\"url\":\"http://94.103.84.233:801\",\"data\":{}}\n```\n\nIt can be seen on the redirect server that the request came to it.\n\n![](https://user-images.githubusercontent.com/156416961/296200143-5afc04e8-3651-4f6f-98d2-1f9f7cd3919a.jpg)\n\nAnd we can also see the request in the localhost server (the same host as directus), which confirms the bypass and the SSRF.\n\n\n<img width=\"437\" alt=\"image\" src=\"https://user-images.githubusercontent.com/156416961/296201651-a9b61f5d-0ccd-4e3e-b137-e82fda8f5347.png\">\n\nAnd the rce_poc file was created. \n\n<img width=\"538\" alt=\"image\" src=\"https://user-images.githubusercontent.com/156416961/296201869-fed5fa94-ece5-497d-a091-c422b1f540a0.png\">\n\n\n\n\n### Impact\nThe impact is Blind SSRF. Using it an attacker can initiate HTTP GET requests to the internal network. For example, it can be used to exploit some GET-based vulnerabilities of other software in the internal network.\n\n### Fix proposition\n\nI think there are two ways to fix this vulnerability:\n\n- Disallow redirects for the import requests\n- Check the Location header in the import request response if it is present. Drop the request if the Location url points to the internal IP.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Directus es una API y un panel de aplicaciones en tiempo real para administrar el contenido de la base de datos SQL. Ya se informó de una vulnerabilidad SSRF mediante la importación de archivos. Se solucionó resolviendo todos los nombres DNS y verificando si la IP solicitada es una dirección IP interna. Sin embargo, es posible saltarse esta medida de seguridad y ejecutar un SSRF mediante redireccionamientos. Directus permite redireccionamientos al importar archivos desde la URL y no verifica la URL del resultado. Así, es posible ejecutar una solicitud a una IP interna, por ejemplo a 127.0.0.1. Sin embargo, es SSRF ciego, porque Directus también utiliza la técnica de interceptación de respuestas para obtener la información sobre la conexión desde el socket directamente y no muestra una respuesta si la dirección IP es interna. Esta vulnerabilidad se solucionó en 10.9.3.","source":"nvd"}],"published":"2024-07-08T15:25:50.000Z","modified":"2026-09-10T03:50:16.391Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N","score":5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N","score":5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N","score":5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":"< 10.9.3","status":"affected"}],"vendor":"directus","product":"directus","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"10.9.3","status":"affected"}],"vendor":"monospace","product":"directus","cpe":"cpe:2.3:a:monospace:directus:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"17.1.0"}],"ecosystem":"npm","package":"@directus/api","purl":"pkg:npm/%40directus/api","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"10.9.3"}],"vendor":"monospace","product":"directus","cpe":"cpe:2.3:a:monospace:directus:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/directus/directus/security/advisories/GHSA-8p72-rcq4-h6pw","tags":["exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/directus/directus/commit/d577b44231c0923aca99cac5770fd853801caee1","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39699","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/directus/directus","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-07-08T18:12:46.359Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-39699","url":"https://www.cve.org/CVERecord?id=CVE-2024-39699","licence":"CVE Terms of Use","modified":"2024-08-02T04:26:15.949Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8p72-rcq4-h6pw","url":"https://github.com/advisories/GHSA-8p72-rcq4-h6pw","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:16.391Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-39699","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39699","licence":"Public domain","modified":"2026-06-17T07:42:29.847Z"}],"updatedAt":"2026-11-25T22:58:42.559Z","epss":{"score":0.00435,"percentile":0.39572,"date":"2026-12-01T12:00:22.000Z"}}