Skip to content

[HIGH] Path traversal in phlo.yaml loading #339

@iamgp

Description

@iamgp

Summary

PHLO_PROJECT_PATH environment variable used without path sanitization. Attackers could set paths like /etc/ or ../../../etc/ to read arbitrary files.

Location

src/phlo/infrastructure/config.py lines 26-39

Vulnerable Code

env_path = os.environ.get("PHLO_PROJECT_PATH")
project_root = Path(env_path or ".")

Recommended Fix

Validate that the resolved path is within the project directory or user home directory. Reject paths containing .. or absolute paths outside allowed directories.


Severity: P1 - High
Category: Security
Audit Reference: AUDIT.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions