You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Bug: `get_fabric_user_by_token()` uses the `Authorization: Bearer <token>` value directly in a SQL query. Attacker supplies SQL that runs as MySQL user and can drop files via `SELECT ... INTO OUTFILE`, yielding code exec (webshell/`.pth` loader).
101
+
- Typical attack surface: `/api/fabric/device/status` (and other Fabric Connector endpoints) over HTTP/HTTPS on the management plane.
102
+
- Rapid test for SQLi:
103
+
104
+
```bash
105
+
curl -sk -X POST \
106
+
-H "Authorization: Bearer ' UNION SELECT NULL,NULL,NULL,NULL INTO OUTFILE '/data/var/tmp/pwn.txt' -- -" \
107
+
https://<host>/api/fabric/device/status
108
+
```
109
+
110
+
- Weaponization: write a `.pth` into FortiWeb's Python site-packages that imports `os;os.system(...)` on interpreter start, or drop a CGI under the webroot. Reloading services will execute the payload.
111
+
- Hunting clues: Authorization headers containing quotes/UNION/SELECT; unexpected files under `/data/lib/python*/site-packages/` or `/data/var/waf/html/ROOT/cgi-bin/`.
- Improper SAML signature verification lets an attacker forge FortiCloud SSO responses and log in as admin with no credentials.
115
+
- Only exploitable when **FortiCloud SSO login** is enabled (it turns on automatically if the appliance was registered via GUI unless the checkbox was unticked).
- Practical probe (non-destructive): send a parameter containing ``;id;`` to management HTTP endpoints and watch for 500 responses with command output; block or patch immediately if any echo is seen.
- Presence of header `CGIINFO` with Base64 JSON containing keys `username`/`loginname`/`vdom`/`profname`.
126
+
- Fabric Connector SQLi: Authorization headers containing SQL metacharacters, sudden files in Python site-packages/CGI dirs, hits to `/api/fabric/device/status` from internet IPs.
127
+
- FortiCloud SSO: unexpected SAML issuers or audience values in `/var/log/ssod`.
100
128
- Backend artifacts:
101
129
- Per-path files under `/var/log/inputcheck/` (gate configuration).
102
130
- Unexpected admin creation and configuration changes.
@@ -105,16 +133,21 @@ Notes:
105
133
## Mitigation
106
134
107
135
- Upgrade to fixed releases (examples: 8.0.2, 7.6.5, 7.4.10, 7.2.12, 7.0.12) per vendor advisory.
136
+
- Patch the other 2025 flaws: SQLi (7.6.4/7.4.8/7.2.11/7.0.11), SSO bypass (8.0.1/7.6.5/7.4.10), command injection (7.6.6/7.4.11/7.2.12/7.0.12/8.0.2).
108
137
- Until patched:
109
138
- Do not expose FortiWeb management plane to untrusted networks.
110
139
- Add reverse-proxy/WAF rules to block:
111
140
- Paths that start with `/api/` and contain `../cgi-bin/fwbcgi`.
112
141
- Requests carrying a `CGIINFO` header.
142
+
- Fabric Connector calls with SQL metacharacters in `Authorization`.
143
+
- SAML endpoints from the internet if FortiCloud SSO is unused.
113
144
- Monitor and alert on the detection indicators above.
114
145
115
146
## References
116
147
117
148
-[When the impersonation function gets used to impersonate users — Fortinet FortiWeb auth bypass (watchTowr Labs)](https://labs.watchtowr.com/when-the-impersonation-function-gets-used-to-impersonate-users-fortinet-fortiweb-auth-bypass/)
118
149
-[watchTowr vs FortiWeb Auth Bypass — Detection artefact generator](https://github.com/watchtowrlabs/watchTowr-vs-Fortiweb-AuthBypass)
0 commit comments