{"id":"EUVD-2024-55682","revision":null,"records":[{"revision":"22a69d7c7f434f3abcd2b042b6544a81","observedAt":"2026-10-29T22:48:55.035+00:00","statement":{"source":"cve-program","id":"CVE-2024-58366","aliases":[],"title":"SurrealDB before 1.1.1 Format String via Scripting Functions","description":"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.","state":0,"publishedAt":"2026-07-18T13:10:06.939+00:00","modifiedAt":"2026-10-29T21:15:09.355+00:00","affected":[{"ecosystem":"Vendor product","name":"surrealdb","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"surrealdb\",\n                    \"product\": \"surrealdb\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"packageURL\": \"pkg:cargo/surrealdb\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"1.1.1\"\n                        },\n                        {\n                            \"version\": \"1.1.1\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"rquickjs","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"DelSkayn\",\n                    \"product\": \"rquickjs\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"packageURL\": \"pkg:cargo/rquickjs\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"0.4.2\"\n                        },\n                        {\n                            \"version\": \"0.4.2\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","vector":"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","score":9,"severity":"CRITICAL"},{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.5,"severity":"HIGH"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-q3gg-m8hr-h4x4","https://www.vulncheck.com/advisories/surrealdb-before-format-string-via-scripting-functions"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2024-58366","license":"CVE Program Terms of Use","key":"cve-program:CVE-2024-58366","identifiers":["CVE-2024-58366"]},"retained":false,"historicalAffected":[]},{"revision":"1d358bd124714f45a7794a91481b6da0","observedAt":"2026-10-29T21:24:42.8+00:00","statement":{"source":"euvd","id":"EUVD-2024-55682","aliases":["CVE-2024-58366","GHSA-qcfm-cmfw-f4x4"],"title":"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…","description":"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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 4.0","vector":"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","score":9,"severity":null}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-q3gg-m8hr-h4x4","https://www.vulncheck.com/advisories/surrealdb-before-format-string-via-scripting-functions"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2024-55682","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jul 18, 2026, 1:10:06 PM","dateUpdated":"Oct 29, 2026, 8:18:54 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2024-55682","identifiers":["EUVD-2024-55682","CVE-2024-58366","GHSA-qcfm-cmfw-f4x4"]},"retained":false,"historicalAffected":[]},{"revision":"0417ede73955489eaddf498514bfd844","observedAt":"2026-10-29T03:27:18.135+00:00","statement":{"source":"nvd","id":"CVE-2024-58366","aliases":[],"title":"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…","description":"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.","state":0,"publishedAt":"2026-07-18T14:17:09.6+00:00","modifiedAt":"2026-10-27T18:10:00.13+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · disclosure@vulncheck.com · Secondary","vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","score":9,"severity":"CRITICAL"},{"system":"CVSS 3.1 · disclosure@vulncheck.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.5,"severity":"HIGH"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-q3gg-m8hr-h4x4","https://www.vulncheck.com/advisories/surrealdb-before-format-string-via-scripting-functions"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2024-58366","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-134"],"productCriteria":["cpe:2.3:a:delskayn:rquickjs:*:*:*:*:*:rust:*:*","cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*"],"sourceDates":{"published":"2026-07-18T14:17:09.600","lastModified":"2026-10-27T18:10:00.130"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2024-58366","identifiers":["CVE-2024-58366"]},"retained":false,"historicalAffected":[]},{"revision":"165c6f621c0249bbbbb1a8acc6c26f99","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-q3gg-m8hr-h4x4","aliases":["CVE-2024-58366"],"title":"Externally Controlled Format String in Scripting Functions","description":"The `rquickjs` crate used by SurrealDB implements Rust bindings to the QuickJS C library and is used to execute SurrealDB scripting functions. The `rquickjs` function `Exception::throw_type` takes a string and returns an error object. Prior to version `0.4.2` of the crate, this string would be fed directly into `printf`, which will receive the error string as a format string with no additional arguments, leading to undefined behavior. This issue triggers when a SurrealDB scripting function returns an error and its input contains a format string such as `%s` or `%d`. \n\nThis vulnerability can only affect SurrealDB servers explicitly enabling the scripting capability with `--allow-scripting` or `--allow-all` and equivalent environment variables `SURREAL_CAPS_ALLOW_SCRIPT=true` and `SURREAL_CAPS_ALLOW_ALL=true`.\n\n### Impact\n\nAn attacker with privileges to execute scripting functions with arbitrary inputs may be able to exploit this format string vulnerability in order read arbitrary memory from the remote SurrealDB process. A format string vulnerability may also be further exploited to execute arbitrary code with the privileges of the SurrealDB process.\n\nThe fact that error messages are limited to 256 bytes coupled with [exploit mitigation features supported in Rust executables](https://doc.rust-lang.org/rustc/exploit-mitigations.html#exploit-mitigations-1) may somewhat increase the complexity of exploiting this vulnerability to reliably achieve remote code execution in practice.\n\n### Patches\n\n- Version 1.1.1 and later are not affected by this issue.\n\n### Workarounds\n\nUsers unable to update should restrict access from untrusted users to define and execute scripting functions. This can be achieved by removing the scripting capability by default or with `--deny-scripting` and equivalent environment variable `SURREAL_CAPS_DENY_SCRIPT=true`. If not possible, network access should be limited to trusted users.\n\n### References\n\n- https://github.com/surrealdb/surrealdb/issues/3327\n- https://github.com/surrealdb/surrealdb/pull/3332\n- https://github.com/DelSkayn/rquickjs/pull/247","state":0,"publishedAt":"2024-02-21T00:04:05+00:00","modifiedAt":"2026-07-19T03:56:47.8889532+00:00","affected":[{"ecosystem":"crates.io","name":"surrealdb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.1.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-q3gg-m8hr-h4x4","https://github.com/surrealdb/surrealdb/issues/3327","https://github.com/surrealdb/surrealdb/pull/3332","https://github.com/surrealdb/surrealdb"],"sourceUrl":"https://github.com/advisories/GHSA-q3gg-m8hr-h4x4","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-q3gg-m8hr-h4x4","identifiers":["GHSA-q3gg-m8hr-h4x4","CVE-2024-58366"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-10-30T23:47:38.6611239+00:00","complete":true,"records":1766,"lastAttemptAt":"2026-10-30T23:47:38.6611239+00:00","lastSuccessAt":"2026-10-30T23:47:38.7981231+00:00","error":null,"lastVerifiedAt":"2026-10-30T23:47:38.7981272+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-7e2c4e7288f2c464ad8c61f3bb6017374714faedcc781283ac06a706ee1a820b-2ab14bbac7aed146eb4566d0c0f2f6122020a00e6e03e98c548f6ca78b564d0c","complete":true,"records":417480,"lastAttemptAt":"2026-10-30T23:45:38.1384309+00:00","lastSuccessAt":"2026-10-30T23:45:37.8421483+00:00","error":null,"lastVerifiedAt":"2026-10-30T23:45:38.1384309+00:00","snapshotPublishedAt":"2026-10-30T23:26:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-5c4d9b0ebd9c445abca7ac807c045a95","complete":true,"records":13563,"lastAttemptAt":"2026-10-30T23:48:39.3566895+00:00","lastSuccessAt":"2026-10-30T23:48:39.352+00:00","error":null,"lastVerifiedAt":"2026-10-30T23:48:39.352+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13635,"expectedIdentifiers":13635,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-10-30T23:47:38.6611239+00:00","complete":true,"records":1094,"lastAttemptAt":"2026-10-30T23:47:38.6611239+00:00","lastSuccessAt":"2026-10-30T23:47:38.7988619+00:00","error":null,"lastVerifiedAt":"2026-10-30T23:47:38.7988621+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-3efe320089534490a7efc7cb0dceb029","complete":false,"records":13575,"lastAttemptAt":"2026-10-30T23:48:04.1207299+00:00","lastSuccessAt":"2026-10-30T23:48:04.117+00:00","error":null,"lastVerifiedAt":"2026-10-30T23:48:04.117+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13599,"expectedIdentifiers":13635,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-21dcd6662970dfea02e4ea60ee637115e8d92664947484d2b9276b3f6568a84f","complete":true,"records":9815,"lastAttemptAt":"2026-10-30T23:47:34.469798+00:00","lastSuccessAt":"2026-10-30T23:47:34.1817587+00:00","error":null,"lastVerifiedAt":"2026-10-30T23:47:34.469798+00:00","snapshotPublishedAt":"2026-10-30T23:33:17+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-2de9ccc5290f060c7aa63f89c25dd76f655a64ba1aba7c05c97fa3bee4f09899","complete":true,"records":1967,"lastAttemptAt":"2026-10-30T23:45:38.2095987+00:00","lastSuccessAt":"2026-10-28T20:55:34.2982937+00:00","error":null,"lastVerifiedAt":"2026-10-30T23:45:38.2095987+00:00","snapshotPublishedAt":"2026-10-28T20:03:08+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-f95f76cd406ae5bae3de632ad37fd2d5160b44f5e6b51748ac6f8f0c0c88e72b","complete":true,"records":3028,"lastAttemptAt":"2026-10-30T23:47:38.6300093+00:00","lastSuccessAt":"2026-10-30T23:47:38.4914494+00:00","error":null,"lastVerifiedAt":"2026-10-30T23:47:38.6300093+00:00","snapshotPublishedAt":"2026-10-30T23:18:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-3bba47d78eb61bae29443e8f4fe215a6614d54f3560d07419145a76e9ac024ad","complete":true,"records":230992,"lastAttemptAt":"2026-10-30T23:47:25.6345449+00:00","lastSuccessAt":"2026-10-30T23:47:24.2343384+00:00","error":null,"lastVerifiedAt":"2026-10-30T23:47:25.6345449+00:00","snapshotPublishedAt":"2026-10-30T23:18:17+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}