Описание
Avo: Missing Authorization in Avo Association Attach Endpoint Allows Unauthorized Relationship Manipulation and Privilege Escalation
Summary
A critical missing authorization flaw exists in Avo's association attach workflow. The UI and GET /resources/:resource/:id/:related/new path can check attach_<association>?, but the actual write endpoint, POST /resources/:resource/:id/:related, does not run the same authorization check before mutating the association.
As a result, an authenticated low-privileged Avo user can bypass hidden/disabled attach controls and directly attach related records to a parent record by sending a crafted POST request. In applications where associations represent teams, tenants, roles, projects, users, memberships, ownership, or other authorization-bearing relationships, this can lead to privilege escalation and cross-tenant data exposure.
Details
The association attach route writes relationships through Avo::AssociationsController#create:
The controller registers an attach authorization callback only for new, not for create:
The new action is only the form-rendering step. The actual mutation happens in create:
create_association then attaches the attacker-supplied related record to the parent:
The only attach-specific authorization helper is:
Because this helper is bound only to new, a policy that denies attach_users?, attach_teams?, attach_roles?, or similar methods blocks the UI/form path but does not protect the write path.
This is inconsistent with the detach path, which does authorize the mutating destroy action:
The bug is especially dangerous because Avo already treats association authorization as an access-control boundary in UI components:
However, server-side enforcement is missing on the actual attach POST endpoint.
Proof of Concept
Prerequisites:
- A Rails application mounts Avo, for example at
/admin. - Avo authorization is enabled.
- A low-privileged user can authenticate to Avo.
- A parent record and a related record are both reachable by ID.
- The relevant policy denies attaching the relationship, for example:
Example target scenario:
- Parent resource:
projects - Parent ID:
1 - Related association:
users - Related user ID to attach:
42 - Expected policy: low-privileged users must not be able to attach users to projects.
The UI/form request may be blocked:
But the direct write endpoint can still be invoked:
Run the attached PoC:
If GET /new is forbidden or redirected but the direct POST succeeds, the authorization bypass is confirmed.
To perform the actual attach:
Expected vulnerable result:
- The low-privileged user can attach the related record despite
attach_<association>?being denied. - The parent record now includes the related record.
Impact
This vulnerability allows unauthorized relationship manipulation through Avo.
Depending on the affected association, the impact can include:
- Privilege escalation by attaching a user to an admin group, privileged project, tenant, organization, role, or membership record.
- Cross-tenant data exposure when tenant/user/project membership determines record visibility.
- Integrity loss by changing ownership, assignment, access-control relationships, or business workflow state.
- Policy bypass even when Avo UI controls correctly hide the attach button or deny the attach form.
Recommended Fix
Enforce attach authorization on the mutating endpoint.
At minimum:
Additionally:
- Authorize against the parent record and the selected related record before writing the relationship.
- Ensure
createfails closed whenattach_<association>?is missing andexplicit_authorizationis enabled. - Add regression tests that directly POST to
/resources/:resource_name/:id/:related_namewhileattach_<association>?returnsfalse. - Verify
has_many,has_one,has_many :through, andhas_and_belongs_to_manyassociation paths all enforce the same server-side authorization.
Ссылки
- https://github.com/avo-hq/avo/security/advisories/GHSA-8fq9-273g-6mrg
- https://nvd.nist.gov/vuln/detail/CVE-2026-55518
- https://github.com/avo-hq/avo/pull/4568
- https://github.com/avo-hq/avo/commit/995928e586fd1788dd496bd51c4dbe4a79cb2b9c
- https://github.com/avo-hq/avo/releases/tag/v3.32.1
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/avo/CVE-2026-55518.yml
- https://www.cve.org/CVERecord?id=CVE-2026-55518
Пакеты
avo
<= 3.32.0
3.32.1
avo
>= 4.0.0.beta.1, < 4.0.0.beta.51
4.0.0.beta.51
Связанные уязвимости
Avo is a framework to create admin panels for Ruby on Rails apps. Prior to 3.32.1 and 4.0.0.beta.51, Avo's association attach workflow checks attach_<association>? in the UI and GET /resources/:resource/:id/:related/new path, but the actual write endpoint, POST /resources/:resource/:id/:related, does not run the same authorization check before mutating the association through Avo::AssociationsController#create. An authenticated low-privileged Avo user can bypass hidden or disabled attach controls and directly attach related records to a parent record by sending a crafted POST request, which can lead to privilege escalation and cross-tenant data exposure where associations represent authorization-bearing relationships. This issue is fixed in versions 3.32.1 and 4.0.0.beta.51.