Skip to content

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

Closed
tomaioo wants to merge 1 commit into
fedify-dev:mainfrom
tomaioo:fix/security/missing-ownership-filter-updates-all-use
Closed

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

Conversation

@tomaioo
Copy link
Copy Markdown
Contributor

@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>
Copy link
Copy Markdown
Member

@dahlia dahlia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching and fixing this security issue!

This bug also exists in the 0.7-maintenance branch (our current stable release line), so we'd like to get this fix into a patch release as soon as possible. Could you please retarget this PR to 0.7-maintenance and rebase your changes onto it? After it's merged there, we'll forward-port the fix to main as well.

dahlia added a commit that referenced this pull request May 5, 2026
Added a changelog entry for the security vulnerability fix where
the hashtag follow and unfollow API endpoints were missing an
ownership filter.

#429

Assisted-by: Claude Code:claude-sonnet-4-6
@dahlia
Copy link
Copy Markdown
Member

dahlia commented May 5, 2026

Ported to and shipped with Hollo 0.7.14 and Hollo 0.8.2.

@dahlia dahlia closed this May 5, 2026
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.

2 participants