{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "1.1.1"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "DESCRIPTION"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "b2610473031b9781ce7d97a5f16c8eaecbb677b5"
            }
          ],
          "repo": "https://github.com/surrealdb/surrealdb",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-q3gg-m8hr-h4x4"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-134"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58366.json",
    "unresolved_ranges": [
      {
        "extracted_events": [
          {
            "fixed": "0.4.2"
          }
        ],
        "source": "AFFECTED_FIELD"
      }
    ]
  },
  "details": "SurrealDB before 1.1.1 contains a format string vulnerability in the rquickjs Exception::throw_type function when scripting is enabled. Attackers with scripting privileges can supply format string sequences in error inputs to read arbitrary memory or execute code with SurrealDB process privileges.",
  "id": "CVE-2024-58366",
  "modified": "2026-07-23T03:56:33.025607314Z",
  "published": "2026-07-18T13:10:06.939Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58366.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/surrealdb/surrealdb/security/advisories/GHSA-q3gg-m8hr-h4x4"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-58366"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/surrealdb-before-format-string-via-scripting-functions"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H",
      "type": "CVSS_V4"
    }
  ],
  "summary": "SurrealDB before 1.1.1 Format String via Scripting Functions"
}