Skip to content

← Actionable
Medium, CVSS 5.3

SurrealDB vulnerable to Improper Authentication when Changing Databases as Scope User

GHSA-gh9f-6xm2-c4j2

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (surrealdb 2.0.0-alpha.6, 1.5.4; surrealdb-core 1.5.1), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • crates.io surrealdb

    Affected
    <= 1.5.3>= 2.0.0-alpha.1, <= 2.0.0-alpha.5
    Fixed in
    1.5.4, 2.0.0-alpha.6
  • crates.io surrealdb-core

    Affected
    <= 1.5.0
    Fixed in
    1.5.1

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
5.3 · CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N · score source
EPSS
No dated EPSS signal available.
Source description

As published by the source; long descriptions are shortened.

Authentication would not be properly validated when an already authenticated scope user would use the use method or USE clause to switch working databases in a session. If there was a user record in the new database with identical record identifier as the original record that the user authenticated with in the original database, this could result in the user being able to perform actions under the identity of the unrelated user in the new database. This issue does not affect system users at any level. By default, record identifiers are randomly generated with sufficient complexity to prevent the identifier collision required to trigger this issue. However, the issue may trigger in situations where multiple databases in the same SurrealDB instance are using explicitly defined or incremental record identifiers to identify users on an identically named table. Impact Under the circumstances described above, a user who has an authenticated session as a scope user in a database could…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-gh9f-6xm2-c4j2

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: GHSA-gh9f-6xm2-c4j2

Advisory: SurrealDB vulnerable to Improper Authentication when Changing Databases as Scope User
IDs: GHSA-gh9f-6xm2-c4j2
Record: https://patchnext.com/advisories/ghsa-gh9f-6xm2-c4j2 (revision 1, source checked 26 Oct 2026, 15:38 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 5.3)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: surrealdb 2.0.0-alpha.6, 1.5.4; surrealdb-core 1.5.1. A vendor fix does not mean a deployment is fixed.

## Affected components
- crates.io surrealdb: affected <= 1.5.3; >= 2.0.0-alpha.1, <= 2.0.0-alpha.5; fixed in 1.5.4, 2.0.0-alpha.6
- crates.io surrealdb-core: affected <= 1.5.0; fixed in 1.5.1

## Suggested inspection (read-only)
- crates.io surrealdb: check the installed version with your package manager.
- crates.io surrealdb-core: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on surrealdb, surrealdb-core.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-gh9f-6xm2-c4j2 (GitHub-reviewed advisory GHSA-gh9f-6xm2-c4j2 lists affected ranges: crates.io surrealdb >=0 =2.0.0-alpha.1 =0 <=1.5.0)

Commands are suggestions: review each one before running it.

Loading voting…