LearnNewsExamplesServices
Frontmatter
id9743
titleEnforce path traversal boundaries for autonomous filesystem reads (DreamService)
stateClosed
labels
enhancementai
assigneestobiu
createdAtApr 6, 2026, 9:07 PM
updatedAtApr 6, 2026, 9:08 PM
githubUrlhttps://github.com/neomjs/neo/issues/9743
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 6, 2026, 9:08 PM

Enforce path traversal boundaries for autonomous filesystem reads (DreamService)

Closedenhancementai
tobiu
tobiu commented on Apr 6, 2026, 9:07 PM

Description

The ReAct loop in DreamService natively loads raw files based on autonomous agent payloads via fs.readFileSync. To prevent capabilities from triggering unintended out-of-bounds reads (path traversal attacks like ../../../etc/passwd via hallucination), we must enforce a strict resolution boundary.

Implementation Overview

  • Apply path.relative against the designated neoRootDir and the payload's targetPath.
  • Intercept and reject any path that attempts to resolve outside the directory scope.
  • Return a "Security Error" to the model loop for self-correction instead of failing silently.
tobiu added the enhancement label on Apr 6, 2026, 9:07 PM
tobiu added the ai label on Apr 6, 2026, 9:07 PM
tobiu referenced in commit a2694ce - "feat: Enforce path traversal boundaries for autonomous filesystem reads (#9743)" on Apr 6, 2026, 9:08 PM
tobiu assigned to @tobiu on Apr 6, 2026, 9:08 PM
tobiu
tobiu Apr 6, 2026, 9:08 PM

Successfully added strict path traversal checks using path.relative to enforce boundary limits during autonomous filesystem reads. Verified and pushed to dev.

tobiu closed this issue on Apr 6, 2026, 9:08 PM