Anti-AIClone

Log date · Wed

Can the Node.js Permission Model isolate your app?

No. We test similarly named paths and explain how to verify your bundled runtime after the July 2026 security releases.

Can the Node.js Permission Model isolate an app?

Do not use the Node.js Permission Model as an isolation boundary against malicious code. Node describes it as a seat belt against accidental resource access by trusted code. [3] On Node 20.19.5, we read two similarly named directories in three configurations: without permissions both reads worked; granting one directory denied the sibling with ERR_ACCESS_DENIED; granting both allowed both reads.

This check responds to a real issue from July 2026: CVE-2026-58043 could over-grant filesystem access across a path prefix boundary. [1] Update the runtime, test your own path rules, and use operating-system isolation to control privileges.

Results of the local check
QuestionFinding
Read allow-extra with only allow granted?The local sample returned ERR_ACCESS_DENIED.
Grant both directories?Both sample files were readable.
Does this prove the fix?No; we ran Node 20, not the security releases.

What the security release addressed

On 29 July 2026, Node.js released v26.5.1, v24.18.1 and v22.23.2, addressing 11 CVEs and updating undici and llhttp. The releases, planned for 28 July, were delayed by a day. [1][2] Three high-severity issues comprised two HTTP/2 problems and the permission-model path-matching flaw. The latter could allow a process running with --permission to read or write outside its intended filesystem allowlist.

The advisory also lists two low-severity permission issues: trace events and process.report could write outside --allow-fs-write paths. Other issues concern HTTPS Agent mTLS identity and TLS session reuse, node:sqlite, DNS, zlib and HTTP parsing. [1] Check each affected version and usage condition; whether you enabled the Permission Model alone does not decide whether an update is needed.

Checking two paths with a shared prefix

We created allow/data.txt and allow-extra/data.txt and used the same script to read both. The available runtime was Node 20.19.5, so this illustrates the permission boundary on an older version; it is not a test of the security releases or the CVE fix. Node 20 uses --experimental-permission; check the documentation for the flags and behavior of your own version. The Node release table lists 20 as end-of-life. [4]

Our read probe.
const fs = require('node:fs');
for (const name of ['allow/data.txt', 'allow-extra/data.txt']) {
  try { console.log(`${name}: ${fs.readFileSync(name, 'utf8').trim()}`); }
  catch (error) { console.log(`${name}: ${error.code}`); }
}

The script itself must also be readable. We granted the script and allow in the first run, then added allow-extra in the second. The output below is copied verbatim from the transcript. The control without a permission flag also read both files.

Actual output for the two grants.
== Read grant for probe and allow directory ==
allow/data.txt: allowed-sample
allow-extra/data.txt: ERR_ACCESS_DENIED
== Read grant for probe and both directories ==
allow/data.txt: allowed-sample
allow-extra/data.txt: sibling-sample

The two paths were treated differently in this sample. The result does not cover every prefix, symbolic link, write or API. Include operations expected to fail: testing only that an allowed path works cannot detect an overly broad grant.

Combine permissions with release updates

The model controls runtime resource access; it does not conceal JavaScript distributed with an app. The documentation explicitly says it offers no security guarantee against malicious code. [3] For untrusted plugins or input, design independent boundaries using processes, OS accounts and filesystem permissions, and limit the data the process can reach.

A runtime bundled with a desktop client, local service or single executable must be updated with the product. Identify the version actually running in the final package and where it came from. For an embedded runtime or derivative distribution, verify the vendor included the fixes rather than comparing only node on the system PATH. Record build identifiers, versions and dependencies, and verify that the update channel can deliver a new package.

Recommendations by case
CaseRecommendation
Filesystem allowlist in useAfter updating, test allowed directories, similar prefixes and write paths for both acceptance and denial.
HTTP/2, mTLS or DNS in useCheck affected versions and usage against the advisory; run targeted regressions.
Untrusted codeUse an independent OS isolation boundary; do not rely on the Permission Model alone.
Node shipped with the appIdentify the actual runtime and vendor fixes, then ship and verify an update.

Check your own app

We built a small sample, created two harmless files, recorded the version and ran three checks. The following commands reproduce the experiment. Do not probe write permissions against production data.

Reproduce the experiment.
mkdir -p allow allow-extra
printf 'allowed-sample\n' > allow/data.txt
printf 'sibling-sample\n' > allow-extra/data.txt
cat > probe.cjs <<'EOF'
const fs = require('node:fs');
for (const name of ['allow/data.txt', 'allow-extra/data.txt']) {
  try { console.log(`${name}: ${fs.readFileSync(name, 'utf8').trim()}`); }
  catch (error) { console.log(`${name}: ${error.code}`); }
}
EOF
node --version
node probe.cjs
node --no-warnings --experimental-permission --allow-fs-read="$PWD/probe.cjs" --allow-fs-read="$PWD/allow" probe.cjs
node --no-warnings --experimental-permission --allow-fs-read="$PWD/probe.cjs" --allow-fs-read="$PWD/allow" --allow-fs-read="$PWD/allow-extra" probe.cjs

Then, in an isolated test environment, record the version of the runtime actually shipped with your product. Put test files in a dedicated directory and configure read and write grants according to that version’s documentation. For each case record expected success inside the allowlist and expected denial for similar prefixes and ungranted directories. Cover the reporting and tracing configurations your app actually uses too.

Replace with the actual standalone Node executable in your package; for an embedded runtime use the vendor’s version-reporting method.
path/to/packaged/node --version

Associate the results with the updated build, OS and permission configuration; verify that denial actually occurs, then regression-test installation, startup and critical flows. Before-and-after differences can help locate compatibility issues, but one passing sample does not prove every vulnerability is fixed. Check the release notes and vendor fix information as well.

Your checklist

  • Identify the actual Node runtime and its source in the final package.
  • Compare the advisory and vendor fix information and schedule an update.
  • Test allowed paths and denial of similar prefixes in an isolated environment.
  • Review write, trace events and process.report configurations.
  • Regression-test affected HTTP/2, mTLS and DNS usage and verify update delivery.

Primary sources

All sources and reproduction status ↗