Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. surrealdb-core
  4. ›
  5. GHSA-gh9f-6xm2-c4j2

GHSA-gh9f-6xm2-c4j2: SurrealDB vulnerable to Improper Authentication when Changing Databases as Scope User

July 11, 2024

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.

References

  • github.com/advisories/GHSA-gh9f-6xm2-c4j2
  • github.com/surrealdb/surrealdb
  • github.com/surrealdb/surrealdb/commit/492f8378d57968dbdf5e63fad41b6ff59bba0b80
  • github.com/surrealdb/surrealdb/pull/4335
  • github.com/surrealdb/surrealdb/security/advisories/GHSA-gh9f-6xm2-c4j2

Code Behaviors & Features

Detect and mitigate GHSA-gh9f-6xm2-c4j2 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.5.1

Fixed versions

  • 1.5.1

Solution

Upgrade to version 1.5.1 or above.

Impact 6.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-287: Improper Authentication

Source file

cargo/surrealdb-core/GHSA-gh9f-6xm2-c4j2.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:13 +0000.