Summary
Wanderer's ActivityPub trail and comment endpoints can return full records without applying PocketBase collection view rules. An unauthenticated attacker who can guess or enumerate record IDs may access private trail details, location data, file and photo URLs, and comments.
Affected context
The issue affects Wanderer deployments before 0.19.3 where the unauthenticated GET /activitypub/trail/{id} and GET /activitypub/comment/{id} endpoints return records without applying PocketBase collection view rules. Exposure depends on whether an attacker can obtain or guess valid record IDs and whether the records contain private information.
Exploit preconditions
- Attack surface: The unauthenticated ActivityPub trail and comment GET endpoints
- Required access: No authenticated account is required
- Trigger point: A request for a trail or comment using its record ID
- Why exploitation is possible: The endpoints return full records without enforcing the collection view rules; an attacker must be able to enumerate or guess valid IDs
Why this happens
The endpoint handlers retrieve and return records without applying the access controls defined by the PocketBase collection view rules. This is an authorization failure associated with CWE-639: Authorization Bypass Through User-Controlled Key: access to a record is not properly restricted when its identifier is supplied in a request. Record IDs should not serve as a substitute for authorization checks.
Potential impact
- Private trail names and descriptions could be disclosed.
- GPS coordinates could reveal sensitive location information.
- GPX file and photo URLs could expose associated activity data or media.
- Private comments could be read without authorization.
General mitigation guidance
Common defensive patterns include:
- Enforce authorization and collection view rules on every endpoint that returns a record.
- Apply access checks to the requested record before returning any fields.
- Return only the fields necessary for the endpoint's purpose.
- Treat record identifiers as untrusted input, not as proof of permission.
- Use secure-by-default access controls and limit the privileges of service components handling private records.
How teams detect issues like this
- Review record-fetching handlers for paths that return data without applying authorization or collection rules.
- Use static analysis or code review checks to flag direct record lookups based on request-supplied identifiers.
- Test unauthenticated access to endpoints using both known and unpredictable record IDs, and verify that private fields are not returned.
- Apply policy checks that require authorization before sensitive records or fields are serialized.

