Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Virtual File System Follow Ups | GoodFirstPicks

Virtual File System Follow Ups

nodejs/node 5 comments 12d ago
View on GitHub
highopenScope: somewhat clearSkill match: maybeNode.jsJavaScript

Why this is a good first issue

Security-critical permission model bypass in VFS implementation requires careful handling.

AI Summary

The VFS implementation currently bypasses Node.js's permission model checks, creating a security vulnerability. The fix requires integrating VFS with the permission system or disabling VFS when permissions are enabled. This is a cross-cutting change affecting many files and requires deep understanding of both systems.

Issue Description

/cc @mcollina

With The Virtual File System PR getting close to landing, there are a number of areas / issues to follow-up on. Flagging here in a new issue to prevent overloading the PR discussion.

Code Review: PR #61478 — Virtual File System for Node.js

  1. Security & Permission Model
  2. API Compatibility Gaps
  3. Correctness Bugs
  4. Windows Path Handling
  5. Performance Concerns
  6. Architecture & Design
  7. Test Runner Mock Integration
  8. Provider-Specific Issues
  9. Test Coverage Gaps
  10. Code Quality & Cleanup

1. Security & Permission Model

We need to decide if VFS should participate in the permissions model and how.

1.1 VFS interception bypasses the Node.js permission model — CRITICAL

Disposition: follow-up

In lib/fs.js, VFS interception happens before the permission model check in every intercepted function. Pattern (repeated 96+ times):

function readFileSync(path, options) {
  const h = vfsState.handlers;
  if (h !== null) {
    const result = h.readFileSync(path, options);
    if (result !== undefined) return result;  // ← returns BEFORE permission check
  }
  // permission check is down here
  if (permission.isEnabled() && !permission.has('fs.read', path)) { ... }
}

When --experimental-permission is active, a VFS mount can serve content for any path without triggering the permission gate. This is the most significant security issue in the PR.

Recommendation: At minimum, when permission.isEnabled(), the VFS handler path should still check permission.has('fs.read', ...) / permission.has('fs.write', ...) as appropriate. Alternatively, disable VFS mounting entirely when the permissi

GitHub Labels

vfs

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 35 points when you complete it!

Risk Flags

  • security implications
  • permission model bypass
Loading labels...

Details

Points35 pts
Difficultyhigh
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno