# CVE-2026-63761: SurrealDB cryptographic algorithm substitution in JWT access method

Source: https://junglewise.ai/threats/cve-2026-63761-surrealdb-cryptographic-algorithm-substitution-in-jwt-access  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-20. Updated: 2026-07-20  
License: CC BY 4.0 with a link back

CVE-2026-63761 · Severity: medium · CVSS 4.3 · Published 2026-07-20

SurrealDB is a multi-model database that uses JSON Web Tokens (JWT) for secure user authentication. In affected versions, configuring the database to use the ES512 encryption algorithm for authentication causes it to silently switch to a different, weaker algorithm (ES384) without notifying the administrator. While this does not allow attackers to steal data or forge identities, it causes legitimate login attempts to fail and prevents the database from working correctly with external security systems that expect the stronger encryption.

Technologies: [surrealdb (crates.io)](https://junglewise.ai/threats/technologies/surrealdb). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is CVE-2026-63761 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-63761 being exploited in the wild.

**How severe is CVE-2026-63761?** Medium severity, with a CVSS score of 4.3, published 20 July 2026.

**Which products and versions are affected?** surrealdb (crates.io) SEMVER:introduced=0,fixed=3.1.0.

**Is there a fix for CVE-2026-63761?** Yes. surrealdb (crates.io): upgrade to 3.1.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-63761 attacked?** It is attacked over the network, in a hosted service.

**Am I affected by CVE-2026-63761?** Check whether you run surrealdb (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- surrealdb (crates.io): upgrade to 3.1.0 or later

  ```sh
  cargo update -p surrealdb
  ```


## Technical details

A cryptographic algorithm substitution vulnerability exists in SurrealDB's JWT access method configuration. When a user defines an access method using 'ALGORITHM ES512', the system silently defaults to ES384 because the underlying 'jsonwebtoken' Rust crate (v10.x) lacks an ES512 variant. This mismatch occurs without any error or log message. While ES384 is still cryptographically secure (preventing token forgery), the flaw causes authentication handshake failures when users provide the P-521 keys required for ES512, as the system expects P-384 keys instead. Additionally, tokens generated by SurrealDB will be rejected by external systems expecting valid ES512 signatures. The issue is resolved in version 3.1.0, which blocks the use of ES512 with an error message and provides deprecation warnings for existing configurations.

## Affected products

- SurrealDB SurrealDB < 3.1.0

## Identifiers

- CVE-2026-63761
- GHSA-fwg2-gr34-q3w8

## Timeline

- 2026-05-27: advisory: GitHub Security Advisory published
- 2026-07-20: disclosed: CVE-2026-63761 published to NVD

## References

- [https://github.com/surrealdb/surrealdb/security/advisories/GHSA-fwg2-gr34-q3w8](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-fwg2-gr34-q3w8)
- [https://www.vulncheck.com/advisories/surrealdb-before-algorithm-downgrade-via-es512](https://www.vulncheck.com/advisories/surrealdb-before-algorithm-downgrade-via-es512)

## Related threats

- [SurrealDB use-after-free in KV backends via affinitypool spawn_local](https://junglewise.ai/threats/cve-2026-121417-surrealdb-before-3-3-0-contains-a-use-after-free-vulnerability)
- [SurrealDB JSON parser denial of service via uncontrolled recursion](https://junglewise.ai/threats/surrealdb-json-parser-denial-of-service-via-uncontrolled-recursion-3037f8a0)
- [SurrealDB ES512 algorithm silently downgraded to ES384](https://junglewise.ai/threats/surrealdb-es512-algorithm-silently-downgraded-to-es384-f0af29b8)
- [SurrealDB permission bypass via WHERE clause evaluation](https://junglewise.ai/threats/surrealdb-permission-bypass-via-where-clause-evaluation-afa6f001)
- [SurrealDB authorization bypass in KILL statement](https://junglewise.ai/threats/surrealdb-authorization-bypass-in-kill-statement-fc230d0f)
