GHSA-qc5p-3mg5-9fh8
HIGHGHSA-qc5p-3mg5-9fh8 is a high-severity (CVSS 8.8) vulnerability in avo. O3 Security confirms whether GHSA-qc5p-3mg5-9fh8 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Avo: Broken Access Control Through Unauthorized Execution of Arbitrary Action Classes Across Resources
Real-World Exposure
avoReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
Summary
A critical Broken Access Control vulnerability was identified in the ActionsController of the Avo framework (v3.x). Due to insecure action lookup logic, an authenticated user can execute any Action class (descendants of Avo::BaseAction) on any resource, even if the action is not registered for that specific resource. This leads to Privilege Escalation and unauthorized data manipulation across the entire application.
Details
The vulnerability exists in the action_class method within app/controllers/avo/actions_controller.rb.
Vulnerable Code
def action_class
# It searches through ALL descendants of BaseAction without resource validation
Avo::BaseAction.descendants.find do |action|
action.to_s == params[:action_id]
end
end
The controller identifies the action class to execute solely based on the params[:action_id] by searching through all BaseAction descendants. It fails to verify whether the requested action is actually permitted or registered for the resource context specified in the request URL (e.g., /admin/resources/posts/actions).
Consequently, an attacker can invoke sensitive actions (e.g., Avo::Actions::ToggleAdmin) through an unrelated resource endpoint (e.g., Post), bypassing the intended resource-action mapping.
Impact
This flaw results in significant security risks:
- Privilege Escalation: An authenticated user with low privileges can execute administrative actions (like toggling admin roles) to escalate their own or others' permissions.
- Unauthorized Operations: Actions designed for restricted resources can be triggered against any record ID in the database.
- Data Integrity Compromise: Attackers can perform unauthorized destructive operations (e.g., Delete, Archive, or Update) on records they should not have access to.
Proof of Concept (PoC)
Steps to Reproduce:
- Log in to the Avo admin panel with limited permissions.
- Identify a target record ID (e.g., User ID: 1) and a sensitive action class (e.g.,
Avo::Actions::ToggleAdmin). - Send a POST request to a resource endpoint where the target action is not registered:
- URL:
POST /admin/resources/posts/actions - Payload:
action_id=Avo::Actions::ToggleAdmin&fields[avo_resource_ids]=1
- URL:
- The server executes the
ToggleAdminlogic on User 1, even though the request was made through thepostsresource context.
PoC Script Snippet:
# Simulating the unauthorized action execution
data = {
'action_id': 'Avo::Actions::ToggleAdmin',
'fields[avo_resource_ids]': '1', # Target Record ID
'authenticity_token': csrf_token
}
response = session.post(f"{BASE_URL}/admin/resources/posts/actions", data=data)
Remediation
Restrict the action lookup to only those actions explicitly registered for the current resource context:
def action_class
# Validate that the action is registered for the current resource
@resource.get_actions.find do |action|
action.to_s == params[:action_id]
end
end
Discoverer
Illunight
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | avo | all versions | 3.31.2 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for avo. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update avo to 3.31.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qc5p-3mg5-9fh8 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-qc5p-3mg5-9fh8 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-qc5p-3mg5-9fh8. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-qc5p-3mg5-9fh8 in your dependencies?
O3 detects GHSA-qc5p-3mg5-9fh8 across RubyGems dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.