chore(deps): update rust crate surrealdb to v3.1.5 [security] - #886
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update rust crate surrealdb to v3.1.5 [security]#886renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Deploying corvus with
|
| Latest commit: |
9161f5a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5751517f.corvus-42x.pages.dev |
| Branch Preview URL: | https://renovate-crate-surrealdb-vul.corvus-42x.pages.dev |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR contains the following updates:
3.0.5→3.1.5Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
SurrealDB: SSRF via JWKS URL — Redirect Following in JWT Key Fetch
GHSA-h5rg-8p7f-47g2
More information
Details
SurrealDB fetches the JWKS document for a JWT or record access method using a bare
reqwestclient that follows HTTP redirects by default. The network capability check incore/src/iam/jwks.rs(check_capabilities_url) is applied only to the originally configured URL; redirect targets are not re-validated. An--allow-net-permitted JWKS host that returns a3xx Locationcan therefore redirect the request to an address the allowlist was meant to block, resulting in a server-side request forgery (SSRF). The protectedHttpClientused byhttp::*functions re-checks every redirect hop and was hardened in 3.1.0, but the JWKS fetcher uses its own client and was not covered.Impact
What an attacker can do:
DEFINE ACCESS ... TYPE JWT URLorTYPE RECORD ... WITH JWT URL), point an access method at an allowlisted host they control and redirect the server's GET to an otherwise-blocked target — cloud metadata, loopback, internal services — bypassing--allow-net/--deny-net.What it can't do:
InvalidAutherror. Nothing is returned to the caller.Patches
The JWKS fetcher now applies a redirect policy that re-validates every redirect target against the configured network capabilities (mirroring
check_capabilities_url) and caps redirects atmax_http_redirects.Workarounds
169.254.0.0/16and internal ranges) so redirect targets are unreachable regardless of in-process checks.References
fix(iam): prevent SSRF in JWKS fetch by re-validating redirect targetsSeverity
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB: Arbitrary file read via DEFINE ANALYZER mapper() filter
GHSA-cc8f-fcx3-gpjr
More information
Details
SurrealDB's full-text search lets you define a text analyzer whose
mapperfilter loads a term-mapping file from disk (DEFINE ANALYZER ... FILTERS mapper('<path>')). A database user with theEDITORorOWNERrole could point that filter at any file the SurrealDB process can read and have its content returned in the query's error message.File access is meant to be restricted by the
SURREAL_FILE_ALLOWLISTsetting, but an empty allowlist applied no restriction at all — and empty is the default.Impact
The file is read with the privileges of the SurrealDB process, so a database
EDITORorOWNERuser can disclose the contents of any file the process can access. Only the first line of the file is returned, except for files with no newlines.However recovering the process's command line and environment could expose startup root credentials (
--user/--pass) and secret environment variables, escalating a single-database role toward full control of the instance.The read on the underlying filesystem is bounded by what the SurrealDB process can reach — any file readable by the OS user it runs as — so the impact scales with how the process is run and what is mounted into it.
Patches
A patch has been included in SurrealDB 3.1.5.
File access is now secure by default.
check_is_path_alloweddenies every path when noSURREAL_FILE_ALLOWLISTis configured, so themapperfilter cannot open any file unless the operator has explicitly allowed its directory. Analyzer parse errors no longer include the contents of the mapped file, only the line number.Workarounds
Users unable to upgrade are advised to consider the following:
SURREAL_FILE_ALLOWLISTto a directory that contains only the intended mapping files; this confines themapperfilter to that path. On affected versions the allowlist must be non-empty to have any effect.EDITORandOWNERdatabase roles only to trusted principals.References
Acknowledgements
Thanks to Jan Kahmen (@kah-ja) for finding and reporting this issue.
Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB: Indexed ORDER BY leaks the value ordering of a SELECT-restricted field
GHSA-h4h3-3rfj-x6fq
More information
Details
A field can be hidden from a user with a field-level SELECT permission (
DEFINE FIELD code ON secret PERMISSIONS FOR select WHERE owner = $auth.id). When that field is indexed, a record user who cannot read it could still recover the relative ordering of its values across every record by issuingORDER BY <field>: the field came backnullas intended, but the rows were returned in the hidden values' true sorted order.To satisfy the sort, the planner selects the field's index and walks it in value order; the field-level permission is applied later, when the row is projected, so the value is nulled but the row order already encodes it. The guard that withholds restricted fields from the
WHEREpath was never applied toORDER BY.Impact
What an attacker can do:
null, but the rows come back in the hidden values' order.What it can't do:
WHEREare still enforced, so only records the caller may already read are ordered.Patches
The query planner now applies the field-permission guard to the
ORDER BYclause as well as theWHEREclause. When an ordered field is hidden from the caller by a field-level SELECT permission, the index sort pushdown is withheld and the rows are sorted after redaction instead, so the row order no longer reflects the hidden values. The dynamic-scan fallback is closed the same way, and a regression test was added.The fix is included in SurrealDB 3.1.5.
Workarounds
Users unable to upgrade are advised to consider the following:
SURREAL_PLANNER_STRATEGY=compute-only; the sort then runs after redaction, so no ordering leaks.References
fix(planner): prevent ORDER BY value-ordering oracle on restricted SELECT fieldsfix(planner): close ORDER BY value-ordering oracle on the DynamicScan fallbackAcknowledgements
Thanks to George Chen (@geo-chen) for finding and reporting this issue.
Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB: Denial of Service via deep operator chains
GHSA-jv2j-mqmw-xvv5
More information
Details
An authenticated user could crash a SurrealDB server with a single query containing a long chain of operators.
Such a query — for example
RETURN 1 + 1 + 1 + ...with tens of thousands of terms — is parsed into an expression tree one level deep per operator. Because the chain is flat and the pratt parser appends to it iteratively, the configured query- and object-recursion limits never fire, so the tree grows unbounded with the length of the query.The root cause: the over-deep tree is later walked recursively, one call per node, when it is dropped, formatted, or lowered for execution — overflowing the thread stack and aborting the process.
Impact
An authenticated user with query-execution privileges can crash a SurrealDB server with a single query containing a long chain of operators. The whole process aborts, denying service to every namespace and database on that instance until it is restarted. The crash occurs during query processing, before any data is read or written (availability only).
Patches
A patch introduces a dedicated expression-depth budget —
expr_recursion_limit, sourced frommax_expression_parsing_depth(default 128, configurable viaSURREAL_MAX_EXPRESSION_PARSING_DEPTH). It is charged once per pratt-parser level and once per operator appended to the spine, so an over-deep operator chain is rejected with a syntax error instead of building a tree that overflows the stack downstream. Paths that re-parse already-validated stored data are exempted, so existing databases with deep stored expressions still load.Workarounds
Users unable to patch should consider the following workarounds:
--deny-arbitrary-querycapability flag for the affected user classes (guest, record, or system)./rpcendpoint, which accepts larger request bodies than the HTTP/sqlendpoint. The/sqlendpoint's 1 MiB body limit lowers the achievable operator depth but does not by itself guarantee the stack cannot be exhausted.Restart=on-failure, or a Docker restart policy), so the server recovers immediately after a crash. This limits downtime from a successful attack but does not prevent the crash.References
fix(syn): bound expression operator-tree depth to prevent stack-overflow DoSSeverity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB: Scraping a TABLE with no available PERMISSIONS to current auth level
GHSA-98fx-66cf-fc7c
More information
Details
A vulnerability was discovered where the user-supplied
WHEREclause in aSELECTstatement is evaluated against the full record data beforePERMISSIONS FOR SELECT WHEREdetermines whether the principal is authorised to access that record. A side-effecting expression in theWHEREclause can exfiltrate record contents before the permission check runs. The same ordering bug affects theSET,MERGE,CONTENTandPATCHclauses of update-variant statements (UPDATE,UPSERT-update,INSERT ON DUPLICATE KEY UPDATE,RELATE-update).This vulnerability is confined to the attacker's current database. It does not cross namespace or database isolation boundaries.
Impact
An authenticated user — including Record and Scope users — can read the full contents of any table in the database they are authenticated against, bypassing
PERMISSIONS FOR SELECT WHERErestrictions on those tables.The most direct exfiltration method requires scripting functions to be enabled (
--allow-scripting/-A). However, exfiltration via SurrealQL'sTHROWstatement is also feasible without scripting functions, and timing-based side-channel extraction is possible in all configurations.All tables within the attacker's current database, regardless of table-level
PERMISSIONS FOR SELECT WHERErestrictions on those tables, are vulnerable to this attack. Tables in other databases within the same namespace, or within other namespaces, are not vulnerable.Patches
A patch has been introduced that runs
check_permissions_tablebefore any user-supplied expression is evaluated against the record. A newcheck_pre_updatehelper centralises this ordering on every update-variant code path. Regression tests coveringWHERE,SET,MERGE,CONTENT,INSERT ON DUPLICATE KEY UPDATE, andRELATEwithTHROWside-effects are included.Workarounds
Affected users who are unable to update may want to:
-A/--allow-scriptingflag. This blocks the most direct exfiltration method but does not fully mitigate the vulnerability, asTHROW-based and timing-based exfiltration remain possible.SELECTqueries with user-controlledWHEREclauses.Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB: ES512 silently downgraded to ES384 due to jsonwebtoken crate limitation
GHSA-fwg2-gr34-q3w8
More information
Details
When a user configures
ALGORITHM ES512for any JWT access method (DEFINE ACCESS ... TYPE JWT ALGORITHM ES512), SurrealDB silently substitutes ES384 at all four internal algorithm conversion points. This occurs because the underlyingjsonwebtokencrate (v10.x) does not include an ES512 algorithm variant, so the mapping defaults to ES384 without raising an error, warning, or log message.Users who provide the correct P-521 key type for ES512 will experience authentication handshake failures due to the curve mismatch with ES384 (which expects P-384).
Impact
Authentication handshake failures when using ES512 with the correct P-521 key type, and when tokens are verified by external systems expecting real ES512 signatures.
This vulnerability cannot be exploited to forge tokens or compromise the integrity or confidentiality of data handled by SurrealDB, as ES384 remains cryptographically strong.
Patches
Versions prior to SurrealDB
v3.1.0are vulnerable.The patches for SurrealDB
v3.1.0block newDEFINE ACCESSstatements usingALGORITHM ES512with a clear error message and add deprecation warnings at runtime for existing stored ES512 definitions.Workarounds
Users should reconfigure affected JWT access methods to use a supported algorithm such as ES384 (with a P-384 key pair) or another supported algorithm. Review any
DEFINE ACCESSstatements specifyingALGORITHM ES512and update them accordingly.Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB has an Authorization Bypass via Composite Record-id Paths
GHSA-6vg3-hgrw-p5gf
More information
Details
An authenticated user could bypass permission rules that gated access on parts of a record's id — most commonly tenant-isolation rules of the form
PERMISSIONS FOR select WHERE id.tenant = $auth.id.tenant. The same defect also let UNIQUE constraints defined on parts of an id admit duplicate entries.When a query referenced part of a composite record id (
id.tenant,id.uid, …), SurrealDB read the value from the record's editable body fields instead of from the immutable id key. Because the body is editable but the id is fixed at creation, an attacker with write access could set the body field to any value and have permission checks read that spoofed value.Impact
What an attacker can do:
id.<field> = $auth.<...>(typically tenant- or scope-isolation boundaries) by writing the same-named field on a record they control to the spoofed value.id.<field>to silently admit duplicate entries, leaving the database with rows that violate the constraint.What it can't do:
-Bypass field-level
PERMISSIONS FORupdate clauses that don't referenceid.<field>paths.Patches
The value-path resolver now special-cases
Part::FieldandPart::ValueagainstRecordIdKey::Object, reading the named component directly from the id key without ever enteringselect_document. The Array-keyed special case (id[0],id[1], …) is unchanged.Workarounds
Users unable to patch are advised to consider the following workarounds:
id.<field>on Object-keyed record ids; gate on the full record id (id = $auth.id) or on a server-derived session value instead.id.<field>until 3.1.0; useDEFINE INDEX ... ON FIELDS id UNIQUE(the full id) where possible.Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB: HTTP RPC Session Race Condition Allows Privilege Escalation
GHSA-4vgr-h27g-cf9p
More information
Details
The HTTP
/rpcendpoint has a time-of-check/time-of-use (TOCTOU) race condition on internal session state. When authenticated and unauthenticated requests are processed concurrently, the unauthenticated request can inherit the authenticated user's session and privileges. The/rpcendpoint is the primary interface used by all official SurrealDB SDKs.The HTTP
/rpchandler does not bind each incoming request to an isolated session context. Instead, concurrent requests share mutable authentication state. When an authenticated request sets the session context and an unauthenticated request races in before it is cleared, the unauthenticated request executes with the authenticated user's privileges.The impact depends on the privilege level of the session that is hijacked. If a root or namespace-level user session is inherited, the attacker can read and modify any data, delete records, and create persistent namespace-level users. If a scoped record user session is inherited, the attacker is limited to that user's permissions.
The attack requires no credentials, tokens, or session knowledge — only the ability to send concurrent HTTP requests to the
/rpcendpoint while legitimate authenticated traffic is active.Impact
An unauthenticated attacker who can reach the
/rpcendpoint can escalate privileges by racing against any active authenticated session. The severity of the impact depends on the permissions of the user whose session was hijacked. This could include escalation to root user of SurrealDB instancePatches
Versions prior to SurrealDB
v3.1.0are vulnerable.A patch has been introduced that replaces the shared default session with per-request session isolation. Every
POST /rpcrequest now allocates a fresh, server-side UUID and runs entirely within that session's scope for the duration of the request. The session-map signatures across the RPC protocol have been changed fromOption<Uuid>toUuidso the "default session" can no longer be represented at the type level, preventing future regressions of the same shape.Workarounds
There is no configuration-level mitigation that fully addresses this vulnerability. Network-level controls restricting access to the
/rpcendpoint to trusted clients can reduce exposure.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB: USE NS/DB implicit creation bypasses DEFINE authorization
GHSA-wp87-mgvq-5j93
More information
Details
An anonymous caller could create new namespaces and databases on a running SurrealDB instance without holding
DEFINE NAMESPACEorDEFINE DATABASEpermission.USE NS <name>andUSE DB <name>automatically create the target when it does not exist. The three placesUSEis handled — the RPCusemethod,Datastore::process_use, and the SurrealQL executor — did not check whether the caller was allowed to create the resource. Under default capabilities any session reached this path, including an unauthenticated guest.Impact
What an attacker can do:
DEFINE NAMESPACE/DEFINE DATABASEpermission. An unauthenticated guest is enough under default capabilities.USE NS <dropped> DB anything.What it can't do:
auth_enabled=false.Patches
All three
USEentry points now check whether the caller hasDEFINE NAMESPACE/DEFINE DATABASEauthority before creating a missing target. Sessions still update their context regardless of authorization, so SDKs that sendusebeforesignincontinue to work — only the catalog creation step is gated. The parent-namespace side-effect path is closed by the same check.Versions 3.1.0 and later are not affected.
Workarounds
--deny-arbitrary-query *for guest principals to remove the entry point.--authand require all callers tosigninbefore issuinguse.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB: LIVE query subscriptions survive session state changes, bypassing access controls
GHSA-4m82-p8cx-f94j
More information
Details
A
LIVE SELECTsubscription records the user's auth state ($auth,$token,$session,$access) when it is registered, and the server uses that recorded state to evaluate the table- and row-levelPERMISSIONSclauses for every subsequent notification. The recorded state is never refreshed.When something changes the user's effective auth state — the originating session is invalidated, the session's TTL expires, or the user signs in, signs up, or authenticates as a different identity on the same connection — the subscription keeps delivering notifications under the old, stale auth state, and the
PERMISSIONSthat should now apply to the connection are never consulted.Impact
A user whose session has been revoked, expired, signed out of, or re-authenticated on the same connection continues to receive real-time notifications evaluated against the prior principal. The attacker does not gain access to new resources — only continued access to resources the prior principal was already permitted to read — but that continued access persists past the point the principal change should have ended it, and persists indefinitely until the originating connection is closed.
This is confidentiality-only: the dispatcher does not enable writes evaluated under the stranded principal.
Patches
invalidate()and TTL expiry —RpcProtocol::invalidatenow callscleanup_lqs(session_id)after clearing the session, dropping every LIVE owned by the now-invalidated session. The notification dispatcher additionally reads the originating session'sexpand skips delivery once it has passed, closing the TTL-expiry leg without requiring theSessionobject to remain in memory.signin/signup/authenticate/refresh— each of these RPC methods now snapshots the session's auth principal (Auth::id()+Auth::level()) before mutating the session and, if the principal has changed after the operation, callscleanup_lqs(session_id). Token refresh against the same identity is therefore preserved; identity change tears stranded subscriptions down.Versions 3.1.0 and later are not affected by this issue.
Workarounds
For unpatched versions, clients should call
reset()(which tears down all LIVE queries owned by the session) orkilleach outstandinglive query IDbefore signing out, signing in as a different identity, or signing up on an existing connection. There is no client-side workaround for the TTL-expiry leg; deployments concerned about it should restrictDURATION FOR SESSIONon access methods that have permission to register LIVE queries.Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB: HTTP /rpc
sessionsmethod leaks attached session UUIDs, enabling full session hijack by anonymous callersGHSA-5qfp-32cf-69jh
More information
Details
The HTTP
/rpcsessionsmethod returned every attached session UUID without authentication, and the/rpchandler accepted an arbitrarysessionfield with no ownership check. An anonymous caller could enumerate UUIDs and impersonate any authenticated session."Attached" means sessions registered via
{"method":"attach"}— the only writer to the HTTP session map. Ordinary stateless/rpcrequests use ephemeral per-request sessions that are filtered fromsessions()and destroyed at end-of-request, so they are not enumerable.Exposure
attach, notably the official Rust SDK'sHttp/Httpsengine (auto-attaches once perSurrealhandle)./sql,/key,/signin,/export, etc.); WebSocket/rpc(per-connection scope,attachrefused); embedded / MCP usage; ad-hocPOST /rpccallers that neverattach.Impact
For each attached and authenticated session, an unauthenticated attacker can read, write, and delete any data the session can reach, dump metadata, invalidate sessions, and escalate to that session's privilege level (up to root). An attached session that has not yet authenticated is
Level::Noand confers no privilege.Patches
sessions()now returnsmethod_not_allowed. WebSocket retains per-connection enumeration./rpchandler gates client-supplied session IDs against the caller's request-level auth principal (actor id + level); mismatches returnsession_not_found.SURREAL_HTTP_MAX_ATTACHED_SESSIONS.Versions 3.1.0 and later are not affected.
Workarounds
No configuration-level mitigation fully addresses this. For Users unable to upgrade:
attachagainst HTTP/rpc(notably the Rust SDK'sHttp/Httpsengine). Prefer the WebSocket transport, or REST endpoints (/sql,/signin,/key,/export) which never populate the attached-session map./rpcto trusted clients at the network layer.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB has unauthenticated remote DoS via malformed RPC
usecallGHSA-wjjj-24cx-f28g
More information
Details
A single unauthenticated WebSocket message to
/rpccrashed the SurrealDB server. Sendinguse { db: "x" }without first selecting a namespace hit.expect("namespace should be set")in theusehandler; becausesurrealdb-coreis built withpanic = 'abort', the panic terminated the process.useis callable beforesignin, and the per-method capability check passes by default for guest callers — so no credentials, token, or--allow-guestsflag are required.Impact
An unauthenticated remote attacker who could reach the
/rpcendpoint could crash the SurrealDB server with a single WebSocket message. No credentials, token, session knowledge, or capability are required.Patches
A patch has been introduced that returns a typed
invalid_paramsresponse whendbis set on a session with nons, replacing the panic.Workarounds
Affected users who are unable to update should restrict network access to the
/rpcendpoint to trusted clients, and run SurrealDB under a process supervisor that restarts on crash.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB: Crafting malicious LIVE queries writes to the database, resulting in DoS, without permission to the table required
GHSA-4v76-cw68-4vc9
More information
Details
A
LIVEquery whoseWHEREclause evaluates to an error caused the source data modifier (the user creating, updating, or deleting a record on the watched table) to fail instead. Calling any arbitrary SurrealQL function with a typed parameter and passing a value of the wrong type — for exampleLIVE SELECT * FROM t WHERE string::trim(deny)— triggered an evaluation error inside the LIVE notification path. That error then propagated through to the triggering write, rolling back the attempted change.While such a
LIVEquery was registered, allCREATE,UPDATE, andDELETEoperations on the watched table failed — including those issued by a root user — for as long as the registration remained active. Registering theLIVErequiredselectpermission on the table; no other permission on the table was needed.Impact
An authenticated user with
selectpermission on a table can prevent allCREATE,UPDATE, andDELETEoperations on that table — by any other user, up to and including root — for the lifetime of a single registeredLIVEquery. Service is restored when theLIVEquery is killed or the session that registered it ends.Patches
A patch has been introduced that:
lq_checkreturns an error during the LIVE notification path, the error is now reported to the LIVE subscriber as anAction::Errornotification and the LIVE processing path returnsOk(()). The triggering write proceeds normally.Action::Errornotification is only delivered after the LIVE subscription'sPERMISSIONSclause has been evaluated, so unauthorised subscribers do not learn even that an error occurred (closing an information-disclosure side channel introduced by the first part of the fix).Workarounds
Users unable to upgrade should restrict the ability of untrusted users to register
LIVEqueries by removing theselectpermission on tables they want to keep writeable, or by gating LIVE registration at the application layer.Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
SurrealDB: Authenticated callers can read fields hidden by field-level SELECT permissions via error messages
GHSA-6g9v-7gq3-p2c6
More information
Details
A record user with UPDATE access could read field values that field-level SELECT permissions hid from them. Arithmetic operators and
extendembedded the raw operand into their error messages, and UPDATE permission checks evaluate against the unreduced document — so triggering such an error against a hidden field returned its value in the resulting error.Impact
A record user issues an UPDATE that performs an incompatible operation against a hidden field — e.g.
UPDATE person:me SET probe = email + 1whenemailis a string — and reads the value from the returned error (Tried to compute "alice@example.com" + 1 …). One field per operation, but the attacker can repeat against any field on any record they can UPDATE.Patches
A patch has been introduced that replaces the raw operand in every
try_*operator and inextendwith the operand's type name ("string","int","array", etc.).Workarounds
Affected users who are unable to update should not grant UPDATE permission on records whose field-level SELECT permissions are expected to hide values from the same caller.
Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
surrealdb/surrealdb (surrealdb)
v3.1.5: Release 3.1.5Compare Source
Release 3.1.5
v3.1.4: Release 3.1.4Compare Source
Release 3.1.4
v3.1.3: Release 3.1.3Compare Source
Release 3.1.3
v3.1.2: Release 3.1.2Compare Source
Release 3.1.2
v3.1.1: Release 3.1.1Compare Source
Release 3.1.1
v3.1.0: Release 3.1.0Compare Source
Release 3.1.0
Configuration
📅 Schedule: (in timezone America/Havana)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.