Advisories for Pypi/Sqladmin package

2026

SQLAdmin: Unvalidated sortBy parameter in `ModelView` bypasses `column_sortable_list`

ModelView.sort_query() uses the attacker-controlled sortBy list-view query parameter without checking it against the configured column_sortable_list allow-list. The value is resolved with getattr(model, …) and fed into relationship joins and order_by(), so a request can sort by any column of the model — including ones hidden from column_list — and, via a dotted path, by columns of related models. Because row order then reflects the value of an unexposed column, this …

SQLAdmin: Authorization Bypass on `ajax_lookup`

The ajax_lookup endpoint in application.py bypasses the is_accessible() access control check that all other endpoints enforce. If a developer restricts model access by overriding is_accessible(), an authenticated user can still query that model's data through the ajax_lookup endpoint — silently bypassing the restriction. Affected endpoint: GET /{identity}/ajax/lookup?name=<field>&term=<query> All other endpoints enforce both checks: | Endpoint | @login_required | is_accessible() | |—|—|—| | list | ✓ | ✓ | | create …