Categories
CVE-2024-58367 medium CVSS 6.5

Vulnerability in surrealdb (CVE-2024-58367)

Summary

Vulnerability in surrealdb (CVE-2024-58367). Confidential information can be exposed externally. Exploitable via SELECT. Mitigation: upgrade to 2.0.4 or later.

Original description

The description as published by the source.

Due to the order in which permissions were processed, some statements, filters and computations could lead to leaking field values or record contents to users without the required permissions. This behavior could be triggered in different scenarios:

  • When performing a SELECT operation on a table, the values that would be returned were iterated over, field permissions would be validated and any unauthorized value would be removed from the result returned. However, performing a SELECT VALUE operation (e.g. SELECT VALUE private FROM data) would result in a non-iterable value, which would not be removed from the returned result.

  • When aliasing a field (e.g. SELECT private AS public FROM data) for which the user did not have SELECT permissions within a SELECT query, permissions would be checked against the field of the resulting document containing the aliased field instead of the original document containing the original field. As a consequence, the original field value would be returned as the returned field would not match the original field where permissions had been defined.

  • When calling a function in the context of a SELECT query and passing a field with permissions as an argument to the function (e.g. SELECT string::lowercase(private) FROM data), the function would receive the field value before it had been removed from the document due to SELECT permissions. As a result, the function would have access to the value of the field regardless of field p…

Source: NIST National Vulnerability Database NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2024-58367 has been found in surrealdb.
Attackers can target a specific entry point like SELECT over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 6.5/10.
What to do: upgrade surrealdb to 2.0.4 or later.
If unsure, ask your IT team or search "surrealdb CVE-2024-58367" on the vendor's site.

CVE-2024-58367 (surrealdb) — CWE-285 / CVSS v3 6.5
Attack vector: remote (network-reachable) / no user interaction
Attack surface: SELECT / WHERE / UPDATE / DELETE
Patched: 2.0.4 — apply immediately
Workaround: Users affected by this issue and unable to update should not rely on the authorization provided by field permissions when it comes to the SELECT permission.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

A vulnerability (CWE-285) exists in surrealdb. Attackers reach the vulnerable code path via SELECT.

📍 Affected scope

Check the vendor advisory for the affected versions of surrealdb. Attack surface: SELECT / WHERE / UPDATE / DELETE.

🔥 Severity

Severity: Medium (CVSS 6.5/10). Confidential information can be exposed externally.

🔧 How to fix

Update to 2.0.4.

🛡️ Workaround

Workaround: Users affected by this issue and unable to update should not rely on the authorization provided by field permissions when it comes to the SELECT permission.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'surrealdb' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'surrealdb' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で surrealdb を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply temporary workaround mitigate
    Users affected by this issue and unable to update should not rely on the authorization provided by field permissions when it comes to the `SELECT` permission.

    パッチが適用されるまでの応急処置として、Users affected by this issue and unable to update should not rely on the authorization provided by field permissions when it comes to the SELECT permission. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade surrealdb to 2.0.4

    ステージング環境で 2.0.4 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

rust surrealdb
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.4"}]}]
rust surrealdb-core
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.4"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details