Catégories
CVE-2025-71395 medium CVSS 6.5

Vulnérabilité dans surrealdb (CVE-2025-71395)

Résumé

Vulnérabilité dans surrealdb (CVE-2025-71395). Risque d'opérations non autorisées ou de divulgation. Exploitable via SURREAL_GENERATION_ALLOCATION_LIMIT. Atténuation : mise à jour vers 2.0.5 ou plus.

Description d'origine

La description telle que publiée par la source (souvent en anglais).

An authenticated user can craft a query using the string::replace function that uses a Regex to perform a string replacement. As there is a failure to restrict the resulting string length, this enables an attacker to send a string::replace function to the SurrealDB server exhausting all the memory of the server due to string allocations. This eventually results in a Denial-of-Service situation for the SurrealDB server.

This issue was discovered and patched during an code audit and penetration test of SurrealDB by cure53. Using CVSSv4 definitions, the severity is High.

Impact

An authenticated user can crash the SurrealDB instance through memory exhaustion

Patches

A patch has been created that enforces a limit on string length SURREAL_GENERATION_ALLOCATION_LIMIT

  • Versions 2.0.5, 2.1.5, 2.2.2, and later are not affected by this issue

Workarounds

Affected users who are unable to update may want to limit the ability of untrusted clients to run the string::replace function in the affected versions of SurrealDB using the --deny-functions flag described within Capabilities or the equivalent SURREAL_CAPS_DENY_FUNC environment variable.

References

SurrealQL Documentation - DB Functions (string::replace)
[SurrealDB Documentation - Capabilities](https://surrealdb.com/docs/surrealdb/security/capabiliti…

Source: NIST National Vulnerability Database NVD GitHub Advisory

Résumé généré automatiquement

Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.

Une vulnérabilité référencée CVE-2025-71395 a été découverte dans surrealdb.
Des attaquants peuvent cibler un point d'entrée spécifique comme SURREAL_GENERATION_ALLOCATION_LIMIT à distance pour détourner le produit.
Risque d'opérations non autorisées ou de divulgation. Score CVSS : 6.5/10.
Action : mettez à jour surrealdb vers 2.0.5 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « surrealdb CVE-2025-71395 » sur le site de l'éditeur.

CVE-2025-71395 (surrealdb) — CWE-789 / CVSS v3 6.5
Vecteur d'attaque : distant (réseau) / sans interaction utilisateur
Surface d'attaque : SURREAL_GENERATION_ALLOCATION_LIMIT / SURREAL_CAPS_DENY_FUNC
Correctif : 2.0.5 — appliquer immédiatement
Contournement : Affected users who are unable to update may want to limit the ability of untrusted clients to run the string::replace function in the affected versions of SurrealDB using the --deny-functions flag described within [Capabilities](https://surrealdb
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.

❓ Quel est le problème

Une vulnérabilité (CWE-789) affecte surrealdb. Les attaquants atteignent le code vulnérable via SURREAL_GENERATION_ALLOCATION_LIMIT.

📍 Périmètre concerné

Consultez l'avis de l'éditeur pour les versions affectées de surrealdb. Surface d'attaque : SURREAL_GENERATION_ALLOCATION_LIMIT / SURREAL_CAPS_DENY_FUNC.

🔥 Gravité

Gravité : Moyenne (CVSS 6.5/10). Risque d'opérations non autorisées ou de divulgation.

🔧 Comment corriger

Mettre à jour vers 2.0.5.

🛡️ Contournement

Contournement : Affected users who are unable to update may want to limit the ability of untrusted clients to run the string::replace function in the affected versions of SurrealDB using the --deny-functions flag described within [Capabilities](https://surrealdb

🔍 Détection

Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.

Actions de réponse

Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre

  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
    Affected users who are unable to update may want to limit the ability of untrusted clients to run the `string::replace` function in the affected versions of SurrealDB using the `--deny-functions` flag described within [Capabilities](https://surrealdb

    パッチが適用されるまでの応急処置として、Affected users who are unable to update may want to limit the ability of untrusted clients to run the string::replace function in the affected versions of SurrealDB using the --deny-functions flag described within [Capabilities](https://surrealdb を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade surrealdb to 2.0.5

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

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

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

Paquets affectés

crates.io surrealdb
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.5"}]}]

Références

Nous utilisons des cookies pour l'analyse d'audience et la mesure publicitaire. Ce réglage s'applique à tous les sites de Game co., Ltd. En savoir plus