Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. surrealdb
  4. ›
  5. GHSA-jc55-246c-r88f

GHSA-jc55-246c-r88f: SurrealDB has an Uncaught Exception Handling Nonexistent Role

November 22, 2024

Roles for system users are stored as generic Ident values and converted as strings and into the Role enum whenever IAM operations are to be performed that require processing the user roles. This conversion expects those identifiers to only contain the values owner, editor and viewer and will return an error otherwise. However, the unwrap() method would be called on this result when implementing std::convert::From<&Ident> for Role, which would result in a panic where a nonexistent role was used.

References

  • github.com/advisories/GHSA-jc55-246c-r88f
  • github.com/surrealdb/surrealdb
  • github.com/surrealdb/surrealdb/pull/5079
  • github.com/surrealdb/surrealdb/pull/5092
  • github.com/surrealdb/surrealdb/security/advisories/GHSA-jc55-246c-r88f

Code Behaviors & Features

Detect and mitigate GHSA-jc55-246c-r88f 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 2.1.0

Fixed versions

  • 2.1.0

Solution

Upgrade to version 2.1.0 or above.

Impact 4.9 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-248: Uncaught Exception

Source file

cargo/surrealdb/GHSA-jc55-246c-r88f.yml

Spotted a mistake? Edit the file on GitLab.

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

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