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
SELECToperation 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 aSELECT VALUEoperation (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 haveSELECTpermissions within aSELECTquery, 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
SELECTquery 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 toSELECTpermissions. 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.
A vulnerability (CWE-285) exists in surrealdb. Attackers reach the vulnerable code path via SELECT.
Check the vendor advisory for the affected versions of surrealdb. Attack surface: SELECT / WHERE / UPDATE / DELETE.
Severity: Medium (CVSS 6.5/10). Confidential information can be exposed externally.
Update to 2.0.4.
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.
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
-
1Identify exposure identify
grep -r 'surrealdb' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
surrealdbを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply 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
SELECTpermission. を実施。回避策の副作用 (機能低下) を確認した上で。 -
3Apply patch patch
Upgrade surrealdb to 2.0.4ステージング環境で 2.0.4 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- web github.com
- web vulncheck.com
- web nvd.nist.gov
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web surrealdb.com
- web surrealdb.com
- web surrealdb.com
- web github.com