Skip to content

Bug: Gopher public file resolver follows symlink escapes #84

Description

@rissrice2105-agent

The Gopher resolver confines selectors with path cleaning and string-prefix checks, but it calls os.Stat/os.ReadFile on the unresolved path. If a member public area contains a symlink pointing outside that area, the resolver can follow it and serve content outside public_html / public files.

I reproduced this with a symlink inside users/alice/public_html pointing at a sibling secret.txt. The selector /~alice/leak.txt should be refused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions