CVE-2026-46645: SQLAdmin Authorization Bypass On `ajax_lookup` Vulnerability

MODERATE
Advisory Identifier: GHSA-54mc-gghv-4cfj
CVSS 4.3
CWE-862
Published
Advisory Summary

CVE-2026-46645 is a MODERATE (CVSS 4.3) authorization bypass on `ajax_lookup` vulnerability (CWE-862: Missing Authorization) affecting SQLAdmin libraries in the PyPI ecosystem. The issue involves authorization bypass on `ajax_lookup`. Remediation is available by upgrading affected packages to version 0.25.1.

CVE-2026-46645 at a Glance

CVE Identifier CVE-2026-46645
GHSA Identifier GHSA-54mc-gghv-4cfj
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-862: Missing Authorization
Affected Product SQLAdmin
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-46645

To remediate this vulnerability, upgrade all affected SQLAdmin dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

sqladmin fixed: 0.25.1
pip install sqladmin>=0.25.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show sqladmin

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-46645, inspect your installed packages using pip:

pip show sqladmin

Analyze the terminal output to locate any version of SQLAdmin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.25.1), your application is affected.

Note: The pip show sqladmin command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In SQLAdmin, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2026-46645 Affected SQLAdmin Versions

1 component(s)
Fixed Versions:
0.25.1
Product / Package Ecosystem Affected Versions Fixed Version
sqladmin
PyPI
< 0.25.1
0.25.1

References

Frequently Asked Questions

What is CVE-2026-46645?
CVE-2026-46645 is a security vulnerability in SQLAdmin involving Authorization Bypass on `ajax_lookup` under CWE-862: Missing Authorization.
Which SQLAdmin versions are affected?
Affected versions include releases prior to 0.25.1 across affected packages: sqladmin.
What version fixes CVE-2026-46645?
Upgrading to 0.25.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sqladmin affected?
Yes, sqladmin is affected in releases prior to 0.25.1. Upgrade your dependency to 0.25.1 or later.
What is the CVSS score of CVE-2026-46645?
CVE-2026-46645 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2026-46645?
CVE-2026-46645 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check PyPI dependencies for CVE-2026-46645?
Run the dependency tree command: 'pip show sqladmin'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-54mc-gghv-4cfj",
  "modified" : "2026-06-11T14:06:18Z",
  "published" : "2026-05-21T21:31:40Z",
  "aliases" : [ "CVE-2026-46645" ],
  "summary" : "SQLAdmin: Authorization Bypass on `ajax_lookup`",
  "details" : "### Impact\n\nThe `ajax_lookup` endpoint in `application.py` bypasses the `is_accessible()` access control check that all other endpoints enforce.\n\nIf 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.\n\n**Affected endpoint:**\n\n`GET /{identity}/ajax/lookup?name=<field>&term=<query>`\n\n**All other endpoints enforce both checks:**\n\n| Endpoint | `@login_required` | `is_accessible()` |\n|---|---|---|\n| `list` | ✓ | ✓ |\n| `create` | ✓ | ✓ |\n| `edit` | ✓ | ✓ |\n| `delete` | ✓ | ✓ |\n| `details` | ✓ | ✓ |\n| `export` | ✓ | ✓ |\n| `ajax_lookup` (before fix) | ✗ | ✗ |\n| `ajax_lookup` (after fix) | ✓ | ✓ |\n\nNote: 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.\n\n### Patches\n\nTwo changes were made to `ajax_lookup`:\n\n1. Replaced the hand-rolled authentication check added in #1035 with the standard `@login_required` decorator used by all other endpoints.\n2. Added the missing `is_accessible(request)` check, raising `HTTP 403` when it returns `False`.\n\n### Workarounds\n\nNone. Developers relying on `is_accessible()` to restrict model visibility are exposed regardless of what other access controls are in place.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "sqladmin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.25.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.25.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/smithyhq/sqladmin/security/advisories/GHSA-54mc-gghv-4cfj"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-46645"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/smithyhq/sqladmin/pull/1035"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/smithyhq/sqladmin/commit/b0d3a19fb9b074a9ed243de46930108375dfbb98"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/smithyhq/sqladmin"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/smithyhq/sqladmin/releases/tag/0.25.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-21T21:31:40Z",
    "nvd_published_at" : "2026-06-10T23:16:47Z"
  }
}