CVE-2026-58043 is a high-severity Node.js Permission Model vulnerability fixed in the July 29, 2026 releases. Node’s radix-tree path matching could grant access to filesystem paths beyond the exact allowlist an operator intended.

The flaw affects Node 22, 24, and 26 when the Permission Model is used. Teams relying on --permission as a boundary should patch to 22.23.2, 24.18.1, or 26.5.1 and test neighboring denied paths.

Quick answer

Upgrade the runtime, inventory every --allow-fs-read and --allow-fs-write rule, and add a negative test for paths that share an allowed prefix. Treat the Permission Model as defense in depth rather than the only isolation boundary.

node --permission \
  --allow-fs-read=/srv/app/config \
  ./dist/permission-smoke.js

The smoke test should read a file under /srv/app/config and fail for neighboring locations such as /srv/app/config-backup and /srv/app/config-secrets.

Run the same check with both read and write permissions when the service uses both capabilities. Keep the test paths synthetic so no real secret appears in logs or CI artifacts.

Why prefix-like path mistakes are dangerous

Permission policies often look obvious to a human: allow one directory and deny everything else. A data structure that matches path components incorrectly can interpret a shared string prefix as authorization.

The result depends on deployment layout. A worker allowed to read public templates might also reach a sibling directory containing credentials or customer exports. A plugin process given a narrow writable cache might write to a similarly named application path.

This is an overgrant. It matters even when the application does not intentionally request the neighboring path because compromised or untrusted code may do so.

Find affected workloads

Search service commands, Dockerfiles, process managers, CI workflows, and infrastructure definitions.

rg -n -- "--permission|--allow-fs-read|--allow-fs-write" \
  Dockerfile* package.json .github/ infra/ deploy/ 2>/dev/null

Also inspect wrapper scripts and environment variables that append NODE_OPTIONS. Record the runtime version, permitted paths, deployment owner, and what untrusted code can run in that process.

The absence of flags in source does not prove the feature is unused; a platform may inject them at runtime.

Build a focused permission test

Create temporary sibling directories with similar names and verify only the intended tree is readable.

import { readFileSync } from "node:fs";

const expected = [
  "/srv/app/config/public.json",
];

const denied = [
  "/srv/app/config-backup/secret.json",
  "/srv/app/config-secrets/token.txt",
];

for (const file of expected) {
  readFileSync(file);
}

for (const file of denied) {
  try {
    readFileSync(file);
    throw new Error(`unexpected access: ${file}`);
  } catch (error) {
    if (error.code !== "ERR_ACCESS_DENIED") throw error;
  }
}

Run this only in a controlled fixture with fake data. Add write tests when --allow-fs-write is used.

Upgrade and verify the running process

Patch within the current major release: 22.23.2, 24.18.1, or 26.5.1. Rebuild immutable images and inspect node --version inside the deployed workload.

Run the focused permission test with the same flags and filesystem layout as production. Then run ordinary integration tests because corrected authorization may expose code that was accidentally depending on broader access.

Strengthen the surrounding boundary

The Permission Model limits Node APIs, but it is not a container sandbox. Use operating-system users, read-only filesystems, container mounts, seccomp or sandboxing where appropriate, and separate processes for untrusted extensions.

Mount only required secrets into a workload. If a path does not exist in the process namespace, a mistake in a JavaScript allowlist cannot expose it.

Keep permission flags narrow and documented. A recursive root such as /srv may make the feature technically enabled but provide little practical reduction in access.

Review after patching

Look for new ERR_ACCESS_DENIED failures in the canary. Each failure may indicate either an incomplete legitimate policy or a previously hidden overgrant. Investigate before broadening the allowlist.

Add the negative sibling-path fixture to runtime-upgrade checks. Security regression tests are most valuable when they express the exact boundary the team depends on.

Primary sources

Patch first, then prove both sides of the policy: the intended file is accessible and a nearly named neighbor is denied. That negative test turns a command-line flag into an observable security contract.

Repeat it whenever filesystem layout or permission flags change.

Record the exact runtime version too.