Skip to content

Path traversal: startsWith check without path.resolve() in file endpoint #2

@consigcody94

Description

@consigcody94

Found via code audit. packages/backend/src/routes/files.ts:96-99. No canonicalization before prefix check. Fix: path.resolve(absPath).startsWith(path.resolve(projectPath) + path.sep)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions