GHSA-54mc-gghv-4cfj

Suggest an improvement
Source
https://github.com/advisories/GHSA-54mc-gghv-4cfj
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-54mc-gghv-4cfj/GHSA-54mc-gghv-4cfj.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-54mc-gghv-4cfj
Aliases
  • CVE-2026-46645
Published
2026-05-21T21:31:40Z
Modified
2026-05-21T21:45:17.780992642Z
Severity
  • 4.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N CVSS Calculator
Summary
SQLAdmin: Authorization Bypass on `ajax_lookup`
Details

Impact

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 | ✓ | ✓ | | edit | ✓ | ✓ | | delete | ✓ | ✓ | | details | ✓ | ✓ | | export | ✓ | ✓ | | ajax_lookup (before fix) | ✗ | ✗ | | ajax_lookup (after fix) | ✓ | ✓ |

Note: before this fix, ajax_lookup also lacked the @login_required decorator — unauthenticated users could query it directly. That was addressed in #1035. This report covers the remaining gap: authenticated but unauthorized users.

Patches

Two changes were made to ajax_lookup:

  1. Replaced the hand-rolled authentication check added in #1035 with the standard @login_required decorator used by all other endpoints.
  2. Added the missing is_accessible(request) check, raising HTTP 403 when it returns False.

Workarounds

None. Developers relying on is_accessible() to restrict model visibility are exposed regardless of what other access controls are in place.

Database specific
{
    "nvd_published_at": null,
    "severity": "MODERATE",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-862"
    ],
    "github_reviewed_at": "2026-05-21T21:31:40Z"
}
References

Affected packages

PyPI / sqladmin

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.25.1

Affected versions

0.*
0.0.0
0.1.0
0.1.1
0.1.2
0.1.3
0.1.4
0.1.5
0.1.6
0.1.7
0.1.8
0.1.9
0.1.10
0.1.11
0.1.12
0.2.0
0.2.1
0.3.0
0.4.0
0.5.0
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
0.10.0
0.10.1
0.10.2
0.10.3
0.11.0
0.12.0
0.13.0
0.14.0
0.14.1
0.15.0
0.15.1
0.15.2
0.16.0
0.16.1
0.17.0
0.18.0
0.19.0
0.20.0
0.20.1
0.21.0
0.22.0
0.23.0
0.24.0
0.25.0

Database specific

last_known_affected_version_range
"<= 0.25.0"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-54mc-gghv-4cfj/GHSA-54mc-gghv-4cfj.json"