---
title: "Release 2.0 | SurrealDB"
description: "Bug fixes: Check limit to string::replace with regular expressions Fixes long running FOR loops, adds script timeouts, improves HTTP redirect security, and…"
url: https://surrealdb.com/releases/2.0
---

# SurrealDB 2.0

[Latest patch: 2.0.5](https://surrealdb.com/releases/2.0#release-2-0-5) [All releases](https://surrealdb.com/releases)

**Patches.** 6 patch releases on the 2.0 line.

**Latest.** 2.0.5, released Apr 10, 2025.

**Stable.** Ready for production, with every patch's notes below.

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

Back to top

[Version 2.0.5](https://surrealdb.com/releases/2.0#release-2-0-5)

[Version 2.0.4](https://surrealdb.com/releases/2.0#release-2-0-4)

[Version 2.0.3](https://surrealdb.com/releases/2.0#release-2-0-3)

[Version 2.0.2](https://surrealdb.com/releases/2.0#release-2-0-2)

[Version 2.0.1](https://surrealdb.com/releases/2.0#release-2-0-1)

[Version 2.0.0](https://surrealdb.com/releases/2.0#release-2-0-0)

[Home](https://surrealdb.com/)

[Releases](https://surrealdb.com/releases)

2.0

Bug fixes: Check limit to string::replace with regular expressions Fixes long running FOR loops, adds script timeouts, improves HTTP redirect security, and…

[Newer release line available: 2.1 →](https://surrealdb.com/releases/2.1)

Released Apr 10, 2025

## 2.0.5

Bug fixes:

- [Check limit to string::replace with regular expressions](https://github.com/surrealdb/surrealdb/pull/5637)
- [Fixes long running FOR loops, adds script timeouts, improves HTTP redirect security, and optimises task yielding for better performance](https://github.com/surrealdb/surrealdb/pull/5597)
- [Backport JS scripting mem exhaustion fix](https://github.com/surrealdb/surrealdb/commit/7798a08aa04e9171a52f22b64b864ab156e4be63)
- [Introduces Regex size limit configuration](https://github.com/surrealdb/surrealdb/pull/5638)
- [Improve error handling on value conversion (RPC / HTTP/SQL endpoint)](https://github.com/surrealdb/surrealdb/commit/9c4cfb08e3162c768c1143bf2343acdf72770f3d)
- [Update rquickjs to newest version](https://github.com/surrealdb/surrealdb/pull/5668)

Security advisories:

- [Uncaught exception in Net module leads to database crash](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-rq86-9m6r-cm3g)
- [Server-takeover via SurrealQL injection on backup import](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-ccj3-5p93-8p42)
- [Memory exhaustion via nested functions and scripts](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-m7rc-8w7m-r9qr)
- [Memory exhaustion via string::replace using regex](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-3633-g6mg-p6qq)
- [No JavaScript script function default timeout could facilitate DoS](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-3824-qmfq-2qv7)
- [CPU exhaustion via custom functions result in total DoS](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-pxw4-94j3-v9pf)
- [Bypass of deny-net flags via redirect results in SSRF](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-5q9x-554g-9jgg)

Upgrade or install

## Get SurrealDB v2.0.5

Pick how you want to install or upgrade. SurrealDB Studio can update connected instances in place, or choose a platform below to copy a CLI command for v2.0.5.

SurrealDB Cloud

macOS

Linux

Windows

Docker

Already installed

You can upgrade your SurrealDB Cloud instance to v2.0.5 effortlessly through SurrealDB Studio.

1. Open the [SurrealDB Studio](https://studio.surrealdb.com/current/instances)
2. Select your organisation and instance
3. On the dashboard, click on the "Upgrade" button
4. Your instance will be updated and restarted automatically

[Full install guide](https://surrealdb.com/surrealdb/install)

Released Oct 8, 2024

## 2.0.4

Performance improvements:

- Added [lower and upper bounds for RocksDB iterators](https://github.com/surrealdb/surrealdb/pull/4926)
- Added [with or without index benchmark](https://github.com/surrealdb/surrealdb/pull/4823)
- Improved [behaviour and performance of reduced document scopes](https://github.com/surrealdb/surrealdb/pull/4873)

Bug fixes:

- Fixed [panic when calling `Thing::try_from("")` - with empty value](https://github.com/surrealdb/surrealdb/pull/4923)
- Fixed [parsing of functions and models in selectors](https://github.com/surrealdb/surrealdb/pull/4924)
- Fixed [clippy warnings in release build](https://github.com/surrealdb/surrealdb/pull/4929)
- Fixed [micro second parsing](https://github.com/surrealdb/surrealdb/pull/4932)

Workflow improvements:

- [Ensure unstable code is also checked in CI](https://github.com/surrealdb/surrealdb/pull/4930)
- [Update versions actively supported for security fixes](https://github.com/surrealdb/surrealdb/pull/4934)

Security advisories:

- [Improper Authorisation in Select Permissions](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-9722-9j67-vjcr)
- [Uncaught Exception Handling Parsing Errors on Empty Strings](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-qjrv-v6qp-x99x)

Newer patch available

## Upgrade to 2.0.5

You are viewing the 2.0.4 changelog. A newer patch in this release line is available - we recommend running 2.0.5 for the latest fixes and improvements.

[View 2.0.5 release notes](https://surrealdb.com/releases/2.0#release-2-0-5)

Released Oct 3, 2024

## 2.0.3

Features:

- [Allowed transactions during imports](https://github.com/surrealdb/surrealdb/pull/4888)
- [Deprecated DELETE on field permissions](https://github.com/surrealdb/surrealdb/pull/4887)
- [Implemented Ord for Duration and Table](https://github.com/surrealdb/surrealdb/pull/4889)
- [Improved Number ordering accuracy](https://github.com/surrealdb/surrealdb/pull/4906)
- [Made `max_value_size` configurable in surrealkv](https://github.com/surrealdb/surrealdb/pull/4912)

Parser improvements:

- [Update reblessive](https://github.com/surrealdb/surrealdb/pull/4892)
- [Fixed digit object name export](https://github.com/surrealdb/surrealdb/pull/4913)

Bug fixes:

- Fixed [record IDs not being used as Object keys](https://github.com/surrealdb/surrealdb/pull/4885)
- Fixed [ID type conversion](https://github.com/surrealdb/surrealdb/pull/4891)
- Fixed [thing parsing function](https://github.com/surrealdb/surrealdb/pull/4897)
- [Removed truthiness check on Datetime that requires after epoch dates](https://github.com/surrealdb/surrealdb/pull/4901)
- [Reintroduced `meta::` scope as deprecated methods](https://github.com/surrealdb/surrealdb/pull/4909)
- [Fixed idiom path processing](https://github.com/surrealdb/surrealdb/pull/4910)
- [Fixed value conversion to a `vector: NONE`](https://github.com/surrealdb/surrealdb/pull/4917)

Workflow improvements:

- [Update SurrealKV version to 0.3.7](https://github.com/surrealdb/surrealdb/pull/4903)
- [Update rocksdb 3rd party dependency](https://github.com/surrealdb/surrealdb/pull/4905)
- [Create major.minor and major tags when pushing to Docker](https://github.com/surrealdb/surrealdb/pull/4915)
- [Update surrealcs dependency](https://github.com/surrealdb/surrealdb/pull/4919)

Newer patch available

## Upgrade to 2.0.5

You are viewing the 2.0.3 changelog. A newer patch in this release line is available - we recommend running 2.0.5 for the latest fixes and improvements.

[View 2.0.5 release notes](https://surrealdb.com/releases/2.0#release-2-0-5)

Released Sep 25, 2024

## 2.0.2

Bug fixes:

- Fixed [fields being parsed as idioms.](https://github.com/surrealdb/surrealdb/pull/4819)
- Fixed [error message panics](https://github.com/surrealdb/surrealdb/pull/4820)
- Fixed [Incorrect lowercase filter in analyzer](https://github.com/surrealdb/surrealdb/pull/4810)
- Fixed [mismatch in record id for edge tables](https://github.com/surrealdb/surrealdb/pull/4827)
- Fixed [immediate insert subqueries](https://github.com/surrealdb/surrealdb/pull/4833)
- Fixed [single check for rpc insert](https://github.com/surrealdb/surrealdb/pull/4812)
- Fixed [decimal parsing](https://github.com/surrealdb/surrealdb/pull/4838)
- Fixed [failed authenticate resulting in session reset](https://github.com/surrealdb/surrealdb/pull/4839)
- Fixed [version patching](https://github.com/surrealdb/surrealdb/pull/4840)
- Fixed [query planner ignoring isolated predicates in WHERE clause](https://github.com/surrealdb/surrealdb/pull/4806)
- Fixed [inconsistent numeric object key](https://github.com/surrealdb/surrealdb/pull/4851)
- Fixed [ULID/UUID gen, programmatically generating ranges, RETURN inside FOR/IF and improves arithmetic operations](https://github.com/surrealdb/surrealdb/pull/4847)
- Fixed [CBOR Range encoding](https://github.com/surrealdb/surrealdb/pull/4862)
- Fixed [parsing bug in graph for bidirectional relationships](https://github.com/surrealdb/surrealdb/pull/4866)
- Fixed [compilation issue on 32bits platforms (other than wasm32)](https://github.com/surrealdb/surrealdb/pull/4867)
- Fixed [setting a range id on a document's id, in and out fields](https://github.com/surrealdb/surrealdb/pull/4868)
- Fixed [max key size for surrealkv store](https://github.com/surrealdb/surrealdb/pull/4874)
- Included [request id in CBOR encoding failure message](https://github.com/surrealdb/surrealdb/pull/4875)
- Fixed [panic when the query file size is too large.](https://github.com/surrealdb/surrealdb/pull/4852)
- Fixed [bug with number ordering](https://github.com/surrealdb/surrealdb/pull/4805)

Improvements:

- Improved [log messages for authentication errors](https://github.com/surrealdb/surrealdb/pull/4821)
  - [Explicitly check for token expiration error](https://github.com/surrealdb/surrealdb/pull/4836)
- Added [GraphQL description exactly matches the comments set by the user](https://github.com/surrealdb/surrealdb/pull/4808)
- Added [configuration capabilities for SurrealCS connection pool size](https://github.com/surrealdb/surrealdb/pull/4826)
- Added [test for including an ID in the content body](https://github.com/surrealdb/surrealdb/pull/4849)
- Added [minor improvements to core engine](https://github.com/surrealdb/surrealdb/pull/4864)
- Added [`VERSION` clause to all queries](https://github.com/surrealdb/surrealdb/pull/4865)
- Added [additional ULID and UUID utilities](https://github.com/surrealdb/surrealdb/pull/4869)
- Added [DTrace profiling support](https://github.com/surrealdb/surrealdb/pull/4879)

Newer patch available

## Upgrade to 2.0.5

You are viewing the 2.0.2 changelog. A newer patch in this release line is available - we recommend running 2.0.5 for the latest fixes and improvements.

[View 2.0.5 release notes](https://surrealdb.com/releases/2.0#release-2-0-5)

Released Sep 18, 2024

## 2.0.1

Bug fixes:

- Fixed [infinite loop in parser](https://github.com/surrealdb/surrealdb/pull/4803)

Newer patch available

## Upgrade to 2.0.5

You are viewing the 2.0.1 changelog. A newer patch in this release line is available - we recommend running 2.0.5 for the latest fixes and improvements.

[View 2.0.5 release notes](https://surrealdb.com/releases/2.0#release-2-0-5)

Released Sep 17, 2024

## 2.0.0

After numerous alpha and beta releases over months of development, we are releasing [SurrealDB v2.0.0!](https://surrealdb.com/blog/challenge-accepted-announcing-surrealdb-2-0) 🎉. The changes for this release pertain to those in between the final `2.0.0-beta-3` and other alpha versions.

***NOTE:*** Because of changes in the underlying way SurrealDB stores data, steps are required to migrate to `2.0.0` from previous versions. Please use the following steps for any existing databases:

- If you are moving from `1.x` to `2.x`, [use the `surreal fix` command](https://surrealdb.com/docs/surrealdb/installation/upgrading/migrating-data-to-2x#moving-from-1x-to-200-beta).

Features:

- [Enable FoundationDB transaction timeout customisation](https://github.com/surrealdb/surrealdb/pull/4166)
- [Implement missing modulo operator in new parser](https://github.com/surrealdb/surrealdb/pull/4182)
- [Restructure the parser around the concept of token gluing.](https://github.com/surrealdb/surrealdb/pull/4081)
- Added [`DEFINE ACCESS`](https://surrealdb.com/docs/surrealql/statements/define/access) statement to grant access to resources.
- Deprecated `DEFINE SCOPE` in favour of [`DEFINE ACCESS ... TYPE RECORD`](https://surrealdb.com/docs/surrealql/statements/define/access/record).
- Deprecated `DEFINE TOKEN` in favour of [`DEFINE ACCESS ... TYPE JWT`](https://surrealdb.com/docs/surrealql/statements/define/access/jwt).
- Deprecated `DEFINE TOKEN ON SCOPE` in favour of [`DEFINE ACCESS ... TYPE RECORD ... WITH JWT`](https://surrealdb.com/docs/surrealql/statements/define/access/record).
- Added customisable algorithm and key when issuing tokens for [records users](https://surrealdb.com/docs/surrealdb/security/authentication#record-users) with the `WITH ISSUER` clause.
- Added customisable [token and session duration](https://surrealdb.com/docs/surrealdb/security/authentication#expiration) to [`DEFINE USER`](https://surrealdb.com/docs/surrealql/statements/define/user) and [`DEFINE ACCESS`](https://surrealdb.com/docs/surrealql/statements/define/access).
- Removed [session expiration](https://surrealdb.com/docs/surrealdb/security/authentication#expiration) when not explicitly defined.
- Changed the `INFO` statement to redact secrets defined via `DEFINE ACCESS`.
- Changed HTTP request headers expected by SurrealDB to require the `surreal-` prefix.
- Removed the `--auth` flag in the CLI to enable it by default. Added [`--unauthenticated`](https://surrealdb.com/docs/surrealdb/cli/start#unauthenticated-mode).
- Removed the `--enable-auth-level` flag in CLI to enable the behaviour by default. Defaults to root.
- Changed authentication to expect level via the [`--auth-level`](https://surrealdb.com/docs/surrealdb/cli/sql#--auth-level-option) flag or `surreal-auth-*` headers.
- Changed the default `--bind` address in the CLI from `0.0.0.0` to `127.0.0.1`.
- Added the `--no-identification-headers` flag in the CLI to limit information leakage.
- Added [`type::range`](https://surrealdb.com/docs/surrealql/functions/database/type#typerange) function.
- Added [`TEMPFILES`](https://surrealdb.com/docs/surrealql/statements/select#the-tempfiles-clause) clause to the `SELECT` statement.
- Introduce resource creation checks for `DEFINE` statement to avoid duplicates.
- Added [string functions](https://surrealdb.com/docs/surrealql/functions/database/string) for IP `string::is::ip`, `string::is::ipv4`, `string::is::ipv6`.
- Introduce resource creation checks for `DEFINE` statement to avoid duplicates.
- Added [string functions](https://surrealdb.com/docs/surrealql/functions/database/string) for IP `string::is::ip`,`string::is::ipv4`,`string::is::ipv6`.
- Added [string functions](https://surrealdb.com/docs/surrealql/functions/database/string) for HTML: `string::html::encode`, `string::html::sanitize`.
- Added new [math functions](https://surrealdb.com/docs/surrealql/functions/database/math): `math::acos`, `math::acot`, `math::asin`, `math::atan`, `math::clamp`, `math::cos`, `math::cot`, `math::deg2rad`, `math::lerp`, `math::lerpangle`, `math::ln`, `math::log`, `math::log2`, `math::log10`, `math::rad2deg`, `math::sign`, `math::sin`, `math::tan`.
- Support batch import with `INSERT` statement. This also extends to relationships between tables using the `INSERT RELATION` statement
- [Allow bridge connectivity in all docker images built](https://github.com/surrealdb/surrealdb/pull/4364)
- [Added define JWT access at the root level](https://surrealdb.com/docs/surrealql/statements/define/access/jwt#root)
- [Allow authenticating with a token from the CLI](https://surrealdb.com/docs/surrealdb/cli/sql#--token-option)
- Added [Asynchronous building for indexes](https://surrealdb.com/docs/surrealql/statements/define/indexes#using-concurrently-clause)
- Improved [HNSW persistence](https://github.com/surrealdb/surrealdb/pull/4214)
- Added [Range value support](https://github.com/surrealdb/surrealdb/pull/4506)
- Added ability to [SELECT with version](https://github.com/surrealdb/surrealdb/pull/4510), [CREATE with version](https://github.com/surrealdb/surrealdb/pull/4548) and [INSERT with version](https://github.com/surrealdb/surrealdb/pull/4583) on SurrealKV
- Added [ENFORCED](https://github.com/surrealdb/surrealdb/pull/4579) keyword to DEFINE TABLE
- SCHEMAFULL tables are now [TYPE NORMAL by default](https://github.com/surrealdb/surrealdb/pull/4558)
- Added [literal types](https://github.com/surrealdb/surrealdb/pull/4557) to the query language
- Added the [.chain() method](https://github.com/surrealdb/surrealdb/pull/4513)
- Added [typed LET statements](https://github.com/surrealdb/surrealdb/pull/4476)
- Added [typed function returns](https://github.com/surrealdb/surrealdb/pull/4475)
- Added [record::exists()](https://github.com/surrealdb/surrealdb/pull/4602) function
- Added [new functions](https://github.com/surrealdb/surrealdb/pull/4608) `value::diff()` and `value:::patch()`
- [Array function changes and additions](https://github.com/surrealdb/surrealdb/pull/4612): `array::all()`, `array::any()`, `array::filter_index()`, `array::find_index()` functions can now take a value or a closure. Also added `array::filter()` and `array::find()` functions.
- Upgraded [SurrealKV to v0.3](https://github.com/surrealdb/surrealdb/pull/4301)
- More flexible [create API](https://github.com/surrealdb/surrealdb/pull/4797) for Rust SDK
- [Query depth limits can now be configured](https://github.com/surrealdb/surrealdb/pull/4787)
- [Added GraphQL config](https://github.com/surrealdb/surrealdb/pull/4704)
- Indexing operators [can now take expressions](https://github.com/surrealdb/surrealdb/pull/4756)
- Support for [mixed number types on range queries](https://github.com/surrealdb/surrealdb/pull/4747)
- [Improved capabilities logic with specific allows able to override general denies](https://github.com/surrealdb/surrealdb/pull/4763)
- ["false" string no longer eagerly evaluated as false](https://github.com/surrealdb/surrealdb/pull/4775)
- [time::epoch](https://github.com/surrealdb/surrealdb/pull/4773) constant now available
- Added [geo::valid() function](https://github.com/surrealdb/surrealdb/pull/4711)
- Method call syntax [now works on integers](https://github.com/surrealdb/surrealdb/pull/4762)
- Improved [GraphQL record fetching](https://github.com/surrealdb/surrealdb/pull/4682)
- [Added `AUTHENTICATE` clause on `RECORD` access](https://surrealdb.com/docs/surrealql/statements/define/access/record#with-authenticate-clause)
- Enabled [publishing SurrealDB ports in Docker for bridge networking connectivity](https://github.com/surrealdb/surrealdb/pull/4276)
- [Allow generating `ULID` and `UUID` based on a timestamp](https://surrealdb.com/docs/surrealql/functions/database/rand#randuuidv4-from-timestamp)
- [Allow unsetting namespace and database on RPC protocol](https://github.com/surrealdb/surrealdb/pull/4373)
- [Moved fetch resolution to a compute method](https://github.com/surrealdb/surrealdb/pull/4312)
- Added [`ALTER TABLE`](https://surrealdb.com/docs/surrealql/statements/alter) statement
- Moved [`AUTHENTICATE`](https://surrealdb.com/docs/surrealql/statements/define/access#with-authenticate-clause) clause to the root of `DEFINE ACCESS` statement to allow the clause to be used in every access method
- Added [`OVERWRITE`](https://github.com/surrealdb/surrealdb/pull/4465) clause for defined resources
- Added [`array::windows()`](https://surrealdb.com/docs/surrealql/functions/database/array#arraywindows) function
- Added [support for idiom destructuring in SurrealQL](https://github.com/surrealdb/surrealdb/pull/4443)
- Added [`string::is::record`](https://github.com/surrealdb/surrealdb/pull/4462) function
- Added [Method chaining for Database functions](https://github.com/surrealdb/surrealdb/pull/4469)
- Added [anonymous functions](https://github.com/surrealdb/surrealdb/pull/4474)
- Added [typed function returns](https://github.com/surrealdb/surrealdb/pull/4475)
- Function return types [now shown in `INFO` statement](https://github.com/surrealdb/surrealdb/pull/4643)
- Type `any` can now [act as an optional type](https://github.com/surrealdb/surrealdb/pull/4659)
- Added [`time::is::leap_year()`](https://surrealdb.com/docs/surrealql/functions/database/time#timeisleap_year) function
- Added environment variables to configure [HTTP endpoint limits](https://surrealdb.com/docs/surrealdb/cli/env) & [JavaScript runtime limits](https://surrealdb.com/docs/surrealdb/cli/env)
- Introduced [savepoint capabilities](https://github.com/surrealdb/surrealdb/pull/4707)
- Added [experimental `VERSION` clause to `INFO FOR DB` and `INFO FOR TABLE`](https://github.com/surrealdb/surrealdb/pull/4692)
- Added [additional chained methods to number values](https://github.com/surrealdb/surrealdb/pull/4741)

Performance improvements:

- [SELECT/count optimisation on table range](https://github.com/surrealdb/surrealdb/pull/4786)
- Improvements to [node membership processing and garbage collection](https://github.com/surrealdb/surrealdb/pull/4780)
- Improvements to [select count table scan](https://github.com/surrealdb/surrealdb/pull/4285)
- Avoid [potentially some methods twice](https://github.com/surrealdb/surrealdb/pull/4731)
- Stabilise and use `parser2` for parsing.
- KNN filtering with limit and KNN distance function.

Bug fixes:

- Fixed [incorrectly parsed identifier characters](https://github.com/surrealdb/surrealdb/pull/4522)
- Fixed [`record<T>` casting from string](https://github.com/surrealdb/surrealdb/pull/4496)
- Connection ID [now stored inside session data](https://github.com/surrealdb/surrealdb/pull/4536)
- Fixed [certain identifier characters not being parsed correctly](https://github.com/surrealdb/surrealdb/pull/4522)
- Fixed [remote fields added to output result](https://github.com/surrealdb/surrealdb/pull/4515) inside SELECT * queries
- [Revise `RecordAccess` structure to aid v2 alpha upgrade](https://github.com/surrealdb/surrealdb/pull/4361)
- Fixed [GHSA-gh9f-6xm2-c4j2](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-gh9f-6xm2-c4j2): Improper Authentication when Changing Databases as Scope User
- Fixed [argument check for `array::clump`](https://github.com/surrealdb/surrealdb/pull/4167)
- Fixed [aborting task leading to an error](https://github.com/surrealdb/surrealdb/pull/4195)
- Fixed [non-enforced field permissions on WHERE statements](https://github.com/surrealdb/surrealdb/pull/4800)
- Fixed [failing search when search analyzer lacks tokenisers](https://github.com/surrealdb/surrealdb/pull/4798)
- Fixed [core dump when performing INSERT](https://github.com/surrealdb/surrealdb/pull/4785)
- Fixed [discarding without error when using RELATE statement on edge that already exists](https://github.com/surrealdb/surrealdb/pull/4785)
- Fixed [modification of arrays with JSON Patch semantics](https://github.com/surrealdb/surrealdb/pull/4784)
- Fixed [selecting directly from a graph edge failing to select all primary edges](https://github.com/surrealdb/surrealdb/pull/4783)
- Fixes to [issues with composite indexes](https://github.com/surrealdb/surrealdb/pull/4746)
- Fixed [INSERT not working in subqueries](https://github.com/surrealdb/surrealdb/pull/4760)
- Fixed [KNN brute force error when an index exists](https://github.com/surrealdb/surrealdb/pull/4143).
- Fixed [Redefining HNSW index error](https://github.com/surrealdb/surrealdb/pull/4142).
- [Check that a field exists before index creation](https://github.com/surrealdb/surrealdb/pull/4148).
- Fixed [missing serialisation for `math::inf`](https://github.com/surrealdb/surrealdb/pull/4132).
- Fixed [polygon serialisation](https://github.com/surrealdb/surrealdb/pull/4127).
- Fixed [panic and infinite loop in parser](https://github.com/surrealdb/surrealdb/pull/4149).
- Fixed [URL parsing function when a port is present](https://github.com/surrealdb/surrealdb/pull/4087).
- Fixed [display formats for access methods](https://github.com/surrealdb/surrealdb/pull/4220)
- Fixed [parser error to allow `ns` as an alias for `NAMESPACE`](https://github.com/surrealdb/surrealdb/pull/4195)
- [Added missing datetime prefix](https://github.com/surrealdb/surrealdb/pull/4244)
- [Removed duplicated badge for docker pulls count in `README.md`](https://github.com/surrealdb/surrealdb/pull/4215)
- Fixed [export for sql::Filter type in surrealdb-core](https://github.com/surrealdb/surrealdb/pull/4156)
- [Updated deprecated version of Node.js](https://github.com/surrealdb/surrealdb/pull/4251)
- Fixed [ELSE IF pretty formatting](https://github.com/surrealdb/surrealdb/pull/4267)
- Changed [geometry point values to floats in CBOR](https://github.com/surrealdb/surrealdb/pull/4266)
- Fixed [authentication checks on root user websocket RPC session](https://github.com/surrealdb/surrealdb/pull/4288)
- Ensured [a transaction is always available when live queries are evaluated](https://github.com/surrealdb/surrealdb/pull/4330)
- Reduced [read lock duration while processing connection messages](https://github.com/surrealdb/surrealdb/pull/4328)
- Ensured [execution halts after the `RETURN` statement](https://github.com/surrealdb/surrealdb/pull/4298)
- Ensured [the server shuts down properly](https://github.com/surrealdb/surrealdb/pull/4295)
- [Fixed querying complex edge table](https://github.com/surrealdb/surrealdb/pull/4391)
- [Removed unnecessary backticks from `INFO FOR` statement output](https://github.com/surrealdb/surrealdb/pull/4438)
- [Fixed live query panic issue](https://github.com/surrealdb/surrealdb/pull/4437)
- [Fixed validation on schemafull `RELATE`](https://github.com/surrealdb/surrealdb/pull/4226)
- [Fixed division by zero bug in `math::mean()`](https://github.com/surrealdb/surrealdb/pull/4402) function
- Improved [`string::is::datetime` and `string::is::uuid`](https://github.com/surrealdb/surrealdb/pull/4462)
- [Parse like (`~`) operator correctly](https://github.com/surrealdb/surrealdb/pull/4460)
- [Removed faulty flatten in graph traversal](https://github.com/surrealdb/surrealdb/pull/4463)
- [Fixed `record<T>` casting from string](https://github.com/surrealdb/surrealdb/pull/4496)
- [Removed `ASSERT` for type `option<T>` and value `NONE`](https://github.com/surrealdb/surrealdb/pull/4483)
- Fixed [`aud` field on a `JWT` claim decoding](https://github.com/surrealdb/surrealdb/pull/4488)
- Removed [unneeded return in matching](https://github.com/surrealdb/surrealdb/pull/4492)
- Disabled [default audience validation for JWKS](https://github.com/surrealdb/surrealdb/pull/4495)
- Fixed [errors in supply chain security workflow](https://github.com/surrealdb/surrealdb/pull/4497)
- Enabled [check for single and multiple token audiences](https://github.com/surrealdb/surrealdb/pull/4493)
- Removed [panic on invalid range scan](https://github.com/surrealdb/surrealdb/pull/4641)
- Added `table` [to reserved keywords](https://github.com/surrealdb/surrealdb/pull/4655)
- Concurrent indexing [no longer fails if record updated during build](https://github.com/surrealdb/surrealdb/pull/4629)
- Unreachable code [now returns an error](https://github.com/surrealdb/surrealdb/pull/4665)
- `DEFINE EVENT` [defaults to `true` when no WHEN clause specified](https://github.com/surrealdb/surrealdb/pull/4662)
- Fixed bug [in which `NONE` and `NULL` both < 1 and > 1](https://github.com/surrealdb/surrealdb/pull/4658)
- Fixed [inconsistency on queries using equality with or without index](https://github.com/surrealdb/surrealdb/pull/4666)
- `Create` on rpc which returned an array [now returns an object](https://github.com/surrealdb/surrealdb/pull/4667). Similar change [made to Rust SDK](https://github.com/surrealdb/surrealdb/pull/4688)
- Rust SDK [fix retrieving multiple columns from the same response](https://github.com/surrealdb/surrealdb/pull/4678)
- [Improved consistency for `surrealdb.query()` and `surrealdb.value()` in JavaScript runtime](https://github.com/surrealdb/surrealdb/pull/4675)
- Fixed [`ENFORCED` keyword not displaying in INFO statement](https://github.com/surrealdb/surrealdb/pull/4635)
- Fixed [GHSA-64f8-pjgr-9wmr](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-64f8-pjgr-9wmr): Untrusted Query Object Evaluation in RPC API
- Improved [`math::mean()` to support returning floats](https://github.com/surrealdb/surrealdb/pull/4390)
- Improved [namespace/database validation for GraphQL](https://github.com/surrealdb/surrealdb/pull/4718)
- Ensured [`TIMEOUT` clauses are processed correctly](https://github.com/surrealdb/surrealdb/pull/4721)
- Fixed [importing from `1.x`](https://github.com/surrealdb/surrealdb/pull/4725)
- Deprecated [missing format inference on RPC protocol](https://github.com/surrealdb/surrealdb/pull/4729)

Workflow improvements:

- [Deprecated `file://`](https://github.com/surrealdb/surrealdb/pull/4505)
- Added [`surreal fix`](https://github.com/surrealdb/surrealdb/pull/4605) command
- Exports [no longer use explicit transactions](https://github.com/surrealdb/surrealdb/pull/4610)
- [/lib path renamed to /sdk](https://github.com/surrealdb/surrealdb/pull/4561)
- [Rename the next workflow to alpha](https://github.com/surrealdb/surrealdb/pull/4175)
- [Improved structured output for `INFO` statement](https://github.com/surrealdb/surrealdb/pull/4217)
- [Added database upgrade test from `1.5.x` to `2.0.x`](https://github.com/surrealdb/surrealdb/pull/4286)
- [Improved `InfoStructure` implementation on `Ident` to return the raw value](https://github.com/surrealdb/surrealdb/pull/4280)
- Improved [placeholder text when filling a bug report](https://github.com/surrealdb/surrealdb/pull/4309)
- [Separate the supply chain security actions to its workflow](https://github.com/surrealdb/surrealdb/pull/4349)
- [Improve Cargo local testing](https://github.com/surrealdb/surrealdb/pull/4347)
- [Limit Cargo build jobs during tests with coverage](https://github.com/surrealdb/surrealdb/pull/4353)
- [Improved type safety in router API](https://github.com/surrealdb/surrealdb/pull/4406)
- [Improved hashing mechanism to aid MTree benchmarking](https://github.com/surrealdb/surrealdb/pull/4408)
- [Removed unnecessary cloning of `DefineStatementAnalyzer`](https://github.com/surrealdb/surrealdb/pull/4379)
- [Simplified string formatting](https://github.com/surrealdb/surrealdb/pull/4260)
- [Refactored transaction, caching, and key-value store interfaces](https://github.com/surrealdb/surrealdb/pull/4257)
- [Imported entry enum in `src/sql/mod.rs`](https://github.com/surrealdb/surrealdb/pull/4375)
- [Extracted duplicated code for storing interfaces to initialize_store](https://github.com/surrealdb/surrealdb/pull/4272)
- [Resolved a TODO: map_err to inspect error](https://github.com/surrealdb/surrealdb/pull/4271)
- [Improved pull request template](https://github.com/surrealdb/surrealdb/pull/4440)
- [Added Improvements to kvs module layer](https://github.com/surrealdb/surrealdb/pull/4418)
- [Updated rustc version to `1.80.0`](https://github.com/surrealdb/surrealdb/pull/4436)
- [Enabled the `ml` feature in nightly and alpha releases](https://github.com/surrealdb/surrealdb/pull/4447)
- [Removed limit to Cargo jobs](https://github.com/surrealdb/surrealdb/pull/4449)
- [Restored `bench-sdk-surrealkv`](https://github.com/surrealdb/surrealdb/pull/4450)
- [Upgraded to http/hyper 10](https://github.com/surrealdb/surrealdb/pull/3726)
- [Upgrade upstream `jsonwebtoken` crate](https://github.com/surrealdb/surrealdb/pull/4472)
- [Bumped SurrealKV version to 0.3.1](https://github.com/surrealdb/surrealdb/pull/4467)
- [Added aliases for complex feature flag combinations](https://github.com/surrealdb/surrealdb/pull/4479)
- [Improved RocksDB range scans](https://github.com/surrealdb/surrealdb/pull/4478)
- [Improved Serialisation for `sql::Value`](https://github.com/surrealdb/surrealdb/pull/4255)
- Improved [parser error type](https://github.com/surrealdb/surrealdb/pull/4652)
- Added Support for [SurrealCS](https://github.com/surrealdb/surrealdb/pull/4458)
- Bumped [async graphql version](https://github.com/surrealdb/surrealdb/pull/4687)
- Improved [transparent API](https://github.com/surrealdb/surrealdb/pull/4651)
- Fixed [cargo dependency loading issue](https://github.com/surrealdb/surrealdb/pull/4660)
- Improved [the logic for migrating IDs in `surreal fix`](https://github.com/surrealdb/surrealdb/pull/4715)

API improvements:

- [Decoupled capabilities from the public API](https://github.com/surrealdb/surrealdb/pull/4173)

Surrealkv API improvements:

- [Changed disk format for compaction in Surrealkv](https://github.com/surrealdb/surrealkv/pull/45)
- [Removed global static Datastore](https://github.com/surrealdb/surrealdb/pull/4377)
- Added [versioning to `SELECT * FROM table` queries](https://github.com/surrealdb/surrealdb/pull/4494)

Parser improvements:

- [Added support for the `s` string prefix in parser](https://github.com/surrealdb/surrealdb/pull/4282)
- [Fixed parser panic when a dot follows a string in idiom-allowed contexts](https://github.com/surrealdb/surrealdb/pull/4287)
- Ensured [variables after the `FETCH` clause are parsed](https://github.com/surrealdb/surrealdb/pull/4086)
- Ensured [UUIDs are parsed correctly](https://github.com/surrealdb/surrealdb/pull/4304)
- [Fixed floating point parsing bug](https://github.com/surrealdb/surrealdb/pull/4337)
- [Updates reblessive dependency to newest version](https://github.com/surrealdb/surrealdb/pull/4352)
- [Removed flume as a dependency in favour of async-channels](https://github.com/surrealdb/surrealdb/pull/4367)
- [Fixed warnings and simplified connection trait](https://github.com/surrealdb/surrealdb/pull/4366)

Breaking changes:

- [Functions beginning with `meta::` renamed to `record::`](https://github.com/surrealdb/surrealdb/pull/4602)
- Functions `string::endsWith()` and `string::startsWith()` [renamed to `string::ends_with()` and `string::starts_with()`](https://github.com/surrealdb/surrealdb/pull/4612)
- Changed `UPDATE` statement behaviour of creating records in favour of new [`UPSERT` statement](https://surrealdb.com/docs/surrealql/statements/upsert).

Experimental features:

- Added [`BEARER` access type and its basic grant management](https://github.com/surrealdb/surrealdb/pull/4302)

Newer patch available

## Upgrade to 2.0.5

You are viewing the 2.0.0 changelog. A newer patch in this release line is available - we recommend running 2.0.5 for the latest fixes and improvements.

[View 2.0.5 release notes](https://surrealdb.com/releases/2.0#release-2-0-5)

Newer release line

### [2.1](https://surrealdb.com/releases/2.1)

Updated Sep 11, 2025

Older release line

### [1.5](https://surrealdb.com/releases/1.5)

Updated Nov 12, 2024

[All releases](https://surrealdb.com/releases)

GET STARTED

## Start building with SurrealDB. One data layer for AI, from object storage to agent memory.

[Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy) [Learn more](https://surrealdb.com/docs/what-is-surrealdb)

![ISO 27001](https://surrealdb.com/assets/static/iso.BzQy4FFy.svg)

![AICPA SOC 2 Type 2](https://surrealdb.com/assets/static/aicpa-soc.CE_YjqhK.svg)

![Cyber Essentials](https://surrealdb.com/assets/static/cyber-essentials.CtbmbYfL.svg)

![GDPR](https://surrealdb.com/assets/static/gdpr.IadR7loS.svg)

![Cyber Essentials Plus](https://surrealdb.com/assets/static/cyber-essentials-plus.Cl5P05xe.svg)

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"Releases","item":"https://surrealdb.com/releases"},{"@type":"ListItem","position":3,"name":"2.0","item":"https://surrealdb.com/releases/2.0"}]}
```

```json
{"@context":"https://schema.org","@type":"TechArticle","headline":"SurrealDB 2.0 release notes","description":"Bug fixes: Check limit to string::replace with regular expressions Fixes long running FOR loops, adds script timeouts, improves HTTP redirect security, and…","datePublished":"2025-04-10T00:00:00.000Z","dateModified":"2025-04-10T00:00:00.000Z","url":"https://surrealdb.com/releases/2.0","mainEntityOfPage":{"@type":"WebPage","@id":"https://surrealdb.com/releases/2.0"},"author":{"@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com"},"publisher":{"@type":"Organization","name":"SurrealDB","logo":{"@type":"ImageObject","url":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg"}},"about":{"@type":"SoftwareApplication","name":"SurrealDB","applicationCategory":"DeveloperApplication","operatingSystem":"Linux, macOS, Windows","softwareVersion":"2.0"}}
```

```json
{"@context":"https://schema.org","@type":"Organization","@id":"https://surrealdb.com/#organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is the context and memory layer for AI agents. A multi-model database for documents, graphs, vectors, and time-series.","foundingDate":"2022","legalName":"SurrealDB Ltd","identifier":{"@type":"PropertyValue","propertyID":"GB-COH","value":"13615201"},"address":{"@type":"PostalAddress","streetAddress":"3rd Floor, 1 Ashley Road","addressLocality":"Altrincham","addressRegion":"Cheshire","postalCode":"WA14 2DT","addressCountry":"GB"},"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"support@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"sales","email":"info@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"security","email":"security@surrealdb.com","url":"https://surrealdb.com/.well-known/security.txt","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"legal","email":"legal@surrealdb.com","url":"https://surrealdb.com/legal","availableLanguage":"English"}],"hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","context layer","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```
