frangoteam FUXA /api/runscript authorization bypass vulnerability
The /api/runscript endpoint checked authorisation against the script identified by the client-supplied id but then executed the script identified by the client-supplied name, so the two could differ. An unauthenticated or low-privilege user could therefore run scripts they were not permitted to run, provided they knew or guessed a privileged script's name.
Originally disclosed on Cisco Talos
A authorization bypass vulnerability exists in the /api/runscript functionality of FUXA (version(s): 1.3.2-2809). A specially crafted HTTP request can lead to execute priviledged operation.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The authorisation check resolved the requested script by its id, while the execution path preferred the client-supplied name, so the two lookups could point at different scripts.
Impact
An unauthenticated or low-privilege user could execute scripts they are not authorised for, which could include unauthorised reads of runtime data, unauthorised writes to tags or device state, and privileged internal operations, depending on the deployed scripts; the attacker must first know or guess a privileged script's name.
What the attacker needed
Network access to the FUXA instance; two or more scripts with different privileges; knowledge or guess of a privileged script name
The fix
The vendor states the execution path now binds execution to the server-side script resolved by id, so a client-supplied name can no longer change the authorised execution target; this is to be included in the next hotfix release.
How it was found
- Send a POST request to the runscript endpoint with a script object in the body.
- Set the script id to one the caller is authorised to run.
- Set the script name to a privileged script the caller is not authorised to run.
- The server authorises the id but executes the named script.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
FUXA lets administrators write small automation scripts that run on the server. Before running one, the server is meant to check that the person asking is allowed to use that particular script. Here the check looked at one script while the server actually ran a different one, so someone without permission could get a privileged script executed.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.