{"items":[{"id":"NVI-00017656","kind":"vulnerability","title":"Decidim: Admin user search allows SQL injection through similarity-based sorting","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-jvqq-cvh4-xm37","CVE-2026-45376"],"plain_summary":"GitHub lists this reviewed advisory for decidim-admin, decidim-admin, decidim-admin. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-3bc4c2386e62766266db41c037586068"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-07-13T16:59:49.000Z","value":"6.8 medium","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-3bc4c2386e62766266db41c037586068"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-3bc4c2386e62766266db41c037586068","url":"https://github.com/advisories/GHSA-jvqq-cvh4-xm37","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-jvqq-cvh4-xm37","publisher":"GitHub Advisory Database","observed_at":"2026-11-04T23:34:12.429Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-3bc4c2386e62766266db41c037586068"],"technology":"decidim-admin","known_exclusions":[],"conditions_summary":"The admin organization user search uses the untrusted term value inside raw SQL ORDER BY expressions. Because the value is interpolated before Rails sanitization is applied, a crafted search string is executed by PostgreSQL as part of the sort expression.\n\n### Technical description\n \nThe vulnerable endpoint is exposed as GET `/admin/organization/users` in `decidim-admin/config/routes.rb`:\n\n```ruby\nresource :organization, only: [:edit, :update], controller: \"organization\" do\n  member do\n    get :users\n  end\nend\n```\n\nThat route reaches `Decidim::Admin::OrganizationController#users`, which forwards the current organization's available users into `search`:\n\n```ruby\ndef users\n  search(current_organization.users.available)\nend\n```\n\nInside `search`, the attacker-controlled source is `params[:term]`:\n\n```ruby\nif (term = params[:term].to_s).present?\n```\n\nThe query has two branches. In both branches, the `WHERE` predicates use bind parameters and are not the injection sink. The vulnerability is in the subsequent `.order(Arel.sql(...))` calls, where the untrusted value is interpolated directly into SQL string literals.\n\nNickname branch:\n\n```ruby\nnickname = term.delete(\"@\")\nrelation.where(\"nic","public_affected_ranges":["< 0.30.9"]},{"certainty":"source_listed","source_ids":["sr-3bc4c2386e62766266db41c037586068"],"technology":"decidim-admin","known_exclusions":[],"conditions_summary":"The admin organization user search uses the untrusted term value inside raw SQL ORDER BY expressions. Because the value is interpolated before Rails sanitization is applied, a crafted search string is executed by PostgreSQL as part of the sort expression.\n\n### Technical description\n \nThe vulnerable endpoint is exposed as GET `/admin/organization/users` in `decidim-admin/config/routes.rb`:\n\n```ruby\nresource :organization, only: [:edit, :update], controller: \"organization\" do\n  member do\n    get :users\n  end\nend\n```\n\nThat route reaches `Decidim::Admin::OrganizationController#users`, which forwards the current organization's available users into `search`:\n\n```ruby\ndef users\n  search(current_organization.users.available)\nend\n```\n\nInside `search`, the attacker-controlled source is `params[:term]`:\n\n```ruby\nif (term = params[:term].to_s).present?\n```\n\nThe query has two branches. In both branches, the `WHERE` predicates use bind parameters and are not the injection sink. The vulnerability is in the subsequent `.order(Arel.sql(...))` calls, where the untrusted value is interpolated directly into SQL string literals.\n\nNickname branch:\n\n```ruby\nnickname = term.delete(\"@\")\nrelation.where(\"nic","public_affected_ranges":[">= 0.31.0.rc1, < 0.31.5"]},{"certainty":"source_listed","source_ids":["sr-3bc4c2386e62766266db41c037586068"],"technology":"decidim-admin","known_exclusions":[],"conditions_summary":"The admin organization user search uses the untrusted term value inside raw SQL ORDER BY expressions. Because the value is interpolated before Rails sanitization is applied, a crafted search string is executed by PostgreSQL as part of the sort expression.\n\n### Technical description\n \nThe vulnerable endpoint is exposed as GET `/admin/organization/users` in `decidim-admin/config/routes.rb`:\n\n```ruby\nresource :organization, only: [:edit, :update], controller: \"organization\" do\n  member do\n    get :users\n  end\nend\n```\n\nThat route reaches `Decidim::Admin::OrganizationController#users`, which forwards the current organization's available users into `search`:\n\n```ruby\ndef users\n  search(current_organization.users.available)\nend\n```\n\nInside `search`, the attacker-controlled source is `params[:term]`:\n\n```ruby\nif (term = params[:term].to_s).present?\n```\n\nThe query has two branches. In both branches, the `WHERE` predicates use bind parameters and are not the injection sink. The vulnerability is in the subsequent `.order(Arel.sql(...))` calls, where the untrusted value is interpolated directly into SQL string literals.\n\nNickname branch:\n\n```ruby\nnickname = term.delete(\"@\")\nrelation.where(\"nic","public_affected_ranges":[">= 0.32.0.rc1, < 0.32.0"]}],"null_published_at":"2026-11-05T19:10:21.447Z","source_updated_at":"2026-07-13T16:59:49.000Z","source_disclosed_at":"2026-07-13T16:59:49.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-04T23:34:12.429Z"}],"next_cursor":null,"snapshot_revision":"42594"}