Skip to content

Security: Missing ownership filter updates all users' followed tags#429

Open
tomaioo wants to merge 1 commit intofedify-dev:mainfrom
tomaioo:fix/security/missing-ownership-filter-updates-all-use
Open

Security: Missing ownership filter updates all users' followed tags#429
tomaioo wants to merge 1 commit intofedify-dev:mainfrom
tomaioo:fix/security/missing-ownership-filter-updates-all-use

Conversation

@tomaioo
Copy link
Copy Markdown

@tomaioo tomaioo commented Apr 12, 2026

Summary

Security: Missing ownership filter updates all users' followed tags

Problem

Severity: High | File: src/api/v1/tags.ts:L28

The follow/unfollow handlers update accountOwners.followedTags without a WHERE clause tied to the authenticated owner. As written, a single authenticated request modifies followed tags for every account owner in the database, causing cross-account data tampering.

Solution

Restrict updates to the authenticated account owner, e.g. .where(eq(accountOwners.id, owner.id)). Also consider de-duplication and idempotency checks when appending tags.

Changes

  • src/api/v1/tags.ts (modified)

The follow/unfollow handlers update `accountOwners.followedTags` without a `WHERE` clause tied to the authenticated owner. As written, a single authenticated request modifies followed tags for every account owner in the database, causing cross-account data tampering.

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant