T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- references/roles/Writer.md:48
- Finding
- Unrestricted Local File References Can Expose Sensitive Host Data<![CDATA[ ## Vulnerability Details **File Location**: `references/roles/Content-Specialist.md:45-49`, `references/roles/Content-Specialist.md:112-116`, `references/roles/Writer.md:48-52`, `references/roles/Writer.md:106-108`, `references/ROLE-IO-MAP.md:64-65`, `references/ROLE-IO-MAP.md:87-88`, `references/ROLE-IO-MAP.md:148`, and `references/LOCAL-FILE-REFERENCES-TEMPLATE.md:9-14` **Vulnerability Type**: Unrestricted local-file access through configurable references **Risk Level**: High ### Vulnerable Code Snippets From `references/roles/Content-Specialist.md:45-49`: ```markdown Optional local content references (human-configurable): - If present, read `$SOCIAL_OPS_DATA_DIR/Guidance/Local-File-References.md`. - Treat it as a curated list of local files/directories that may inform lane strategy. - Only read items that exist and are accessible in the current environment. - Skip missing paths without failing the run; note skips in the Content log. ``` From `references/roles/Content-Specialist.md:112-116`: ```markdown - If `$SOCIAL_OPS_DATA_DIR/Guidance/Local-File-References.md` exists: - Read listed local references (files/directories) that exist. - Use them as optional context inputs for lane strategy decisions. - Record any missing/unreadable configured references in the run log. ``` From `references/roles/Writer.md:48-52`: ```markdown Optional local content references (human-configurable): - If present, read `$SOCIAL_OPS_DATA_DIR/Guidance/Local-File-References.md`. - Treat it as a curated list of local files/directories that may inform post drafting. - Only read items that exist and are accessible in the current environment. - Skip missing paths without failing the run; note skips in the Writer log. ``` From `references/roles/Writer.md:106-108`: ```markdown - Read `$SOCIAL_OPS_DATA_DIR/Guidance/Local-File-References.md` if present - Read listed local references relevant to the chosen lane - Scan recent Research logs for topical inspiration ``` ...[truncated 3790 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Define a dedicated, least-privilege content root, such as: ```text $SOCIAL_OPS_DATA_DIR/Approved-References/ ``` 2. Resolve every configured path to its canonical path before reading it and verify that the result remains beneath the approved root. 3. Reject: - Absolute paths - Paths containing `..` - Symlinks that resolve outside the approved root - Device files, sockets, and other non-regular files - Hidden credential files - Broad directory references unless explicitly approved 4. Maintain a denylist for sensitive filenames and directories, including: - `.env` - `.ssh` - `.aws` - `.config/gcloud` - Credential stores - Browser profiles - Private-key formats 5. Make `Local-File-References.md` human-owned. Remove Researcher write authority or require explicit operator approval for every change. 6. Add file-count and byte-size limits to prevent recursive or excessively broad reads. 7. Treat all referenced content as untrusted data. Explicitly instruct agents not to follow commands or operational instructions found inside referenced files. 8. Add a mandatory human approval step before referenced local content can be moved into the publishable Todo queue. 9. Add automated tests covering absolute paths, traversal, symlink escapes, sensitive filenames, and oversized directories. ]]>
