T05 · Unauthorized Access and Privilege Escalation
- Location
templates/module-images-template.md:8- Finding
Hardcoded Cross-User Filesystem Paths in Operational Subagent Templates
- Content
View full analysis
Vulnerability Details
File Location:
templates/module-chapters-template.md:8-34;templates/module-concept-template.md:8-20;templates/module-images-template.md:8-26;templates/module-publication-template.md:8-33;templates/module-review-template.md:8-81;templates/module-revision-template.md:8-34;templates/module-writer-extras-template.md:8-17
Vulnerability Type: Hardcoded cross-user filesystem access
Risk Level: MediumVulnerable Code
Representative code from
templates/module-images-template.md:8-26:markdown Read these files: 1. `/home/felix/.openclaw/workspace/novelcraft/Books/projects/{PROJECT}/project-manifest.md` 2. `/home/felix/.openclaw/workspace/novelcraft/config/module-images.md` 3. `/home/felix/.openclaw/workspace/novelcraft/Books/projects/{PROJECT}/00-concept/image_requests.md` **EXTRACT IMAGE DIMENSIONS from module-images.md:** Look for resolution configuration in the "Auflösungen pro Bildtyp" section. If not found, use these defaults: - cover: 768×1024 - portraits: 512×768 - world_visuals: 1024×512 - chapter_visuals: 512×512 **STEP 2: Generate Images** Provider: MFLUX-WebUI at http://192.168.2.150:7861 Settings: low_ram=true **STEP 3: Output Files** Save to: `/home/felix/.openclaw/workspace/novelcraft/Books/projects/{PROJECT}/images/`Additional affected path instructions include:
markdown Save to: `/home/felix/.openclaw/workspace/novelcraft/Books/projects/{PROJECT}/01-drafts/chapter_{XX}_draft.md` Copy approved chapter to: `/home/felix/.openclaw/workspace/novelcraft/Books/projects/{PROJECT}/02-chapters/chapter_{XX}.md` Output: `/home/felix/.openclaw/workspace/novelcraft/Books/projects/{PROJECT}/03-final/`Technical Analysis
Operational templates consistently use the absolute home directory
/home/felixinstead of resolving the workspace belonging to the invoking user. This conflicts with the localized workspace described e ...[truncated 2290 chars]- Remediation
View remediation
Remediation Suggestions
- Replace every
/home/felix/.openclaw/...path with a workspace root supplied by the trusted OpenClaw runtime. - Do not derive the home directory from user-authored project content or environment values unless the runtime validates them.
- Canonicalize the workspace and destination paths before every read, write, copy, or publication operation.
- Verify that each canonicalized path remains beneath the expected NovelCraft workspace root.
- Restrict project IDs to a conservative format such as
^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$; reject absolute paths, separators,.components, and..components. - Reject or safely handle symlinks that resolve outside the project root.
- Run subagents with per-user identities and least-privilege filesystem permissions.
- Add automated tests that execute templates under a non-
felixaccount and confirm that no operation touches another home directory. - Update all seven affected templates together so that modules cannot resolve the same project to inconsistent locations.
- Replace every
