Skip to content
Access control Disclosed report Intermediate

Hidden/restricted tags can be mutated through synonym ID paths without per-tag authorization

The synonym creation and tag settings endpoints only checked permission on the visible target tag, not on each synonym tag ID supplied. A non-admin tag editor could therefore change the synonym relationship of a hidden or restricted tag they could not even view.

ahpuh Follow

Originally disclosed on HackerOne

Medium 4.3 View original
  • Fixed in 36 days
  • Disclosed after 4 months

Discourse requires both tag-edit permission and tag visibility for a user to edit a tag. However, the ID-based synonym mutation paths do not consistently enforce that rule for each tag being modified.

TagsController#create_synonyms authorizes only the target tag (guardian.ensure_can_edit_tag!(@tag)) and then forwards attacker-supplied synonym tag IDs to DiscourseTagging.add_or_create_synonyms without verifying that the user can see or edit each referenced synonym tag.

TagSettingsUpdater has the same issue for new_synonyms and removed_synonym_ids: it accepts tag IDs and mutates synonym relationships without per-synonym authorization checks.

In local reproduction on the 2026.4.0-latest source:

  1. a non-admin tag editor could not view a hidden tag (GET /tag/:hidden_id/info.json returned 404),
  2. but the same user could still submit the hidden tag's numeric ID to /tag/:visible_id/synonyms.json and /tag/:visible_id/settings.json,
  3. and both paths updated the hidden tag's target_tag_id successfully.

This is an authorization bypass affecting hidden/restricted tag integrity. If the vendor considers a similar hidden-tag synonym issue already fixed, this should be triaged as an incomplete fix / variant.

  1. Create a non-admin user in edit_tags_allowed_groups.
  2. Create one visible tag the user can edit.
  3. Create one hidden/restricted tag in a tag group the user cannot access.
  4. Sign in as the non-admin tag editor.
  5. Request /tag/<hidden_tag_id>/info.json.
  6. Observe that the response is 404, confirming the hidden tag is not visible.
  7. Send POST /tag/<visible_tag_id>/synonyms.json with tags[0][id]=<hidden_tag_id>.
  8. Observe that the request succeeds and the hidden tag becomes a synonym of the visible tag.
  9. Reset state and send PUT /tag/<visible_tag_id>/settings.json with tag_settings[new_synonyms][0][id]=<hidden_tag_id>.
  10. Observe that this also succeeds and updates the hidden tag's synonym relationship.

2 examples, 0 failures

Impact

Summary:

A non-admin user with tag-editing permission can modify hidden or restricted tags by supplying their numeric IDs to the synonym creation and tag settings endpoints. Although the user cannot view the hidden tag, the controller only authorizes the visible target tag and does not re-check authorization for each synonym tag ID, allowing hidden tags to be reassigned as synonyms of a visible tag.

This allows a tag editor to modify the synonym relationship of a hidden or restricted tag they are not allowed to view or edit. The practical impact is unauthorized mutation of hidden tag taxonomy and integrity corruption of tag relationships through numeric-ID paths that skip per-synonym authorization checks.

The original report as published on HackerOne, by ahpuh. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the synonym endpoints authorise only the target tag and then pass user-supplied synonym tag IDs to the tagging layer without a per-tag visibility or edit check.

Impact

A tag editor could modify the synonym relationship of a hidden or restricted tag they are not allowed to view or edit, corrupting tag taxonomy.

What the attacker needed

A non-admin account in the tag-editing group; a visible tag the user can edit; knowledge of the hidden tag's numeric ID

How it was found

  1. Create a non-admin user in the group allowed to edit tags.
  2. Create a visible tag the user can edit and a hidden tag the user cannot access.
  3. Sign in as the non-admin tag editor and confirm the hidden tag returns 404.
  4. Send a synonym creation request to the visible tag with the hidden tag's numeric ID.
  5. Observe the request succeeds and the hidden tag becomes a synonym.
  6. Reset state and send a settings update with the hidden tag ID as a new synonym, which also succeeds.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Tags are labels used to group posts, and some tags are hidden so only certain people can see or change them. The server checked that the user was allowed to edit the visible tag but forgot to check the hidden tag that was also being changed, so the user could quietly alter a tag they were not supposed to touch.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Discourse

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.