Junglewise Threat Intelligence

SurrealDB silent JWT algorithm downgrade from ES512 to ES384

Severity: medium · CVSS 4.3 · Published 2026-07-01

Technologies: surrealdb (crates.io). Vendors: crates.io, SurrealDB.

Executive brief

SurrealDB is a multi-model database. A vulnerability exists where the system incorrectly handles a specific encryption algorithm (ES512) for JSON Web Tokens (JWT), silently downgrading it to a weaker version (ES384). While this does not allow data theft or unauthorized access, it can cause authentication failures and service disruptions for users relying on high-security cryptographic keys.

Technical details

A cryptographic algorithm downgrade vulnerability exists in SurrealDB's JWT access method handling. When 'ALGORITHM ES512' is configured, the system silently substitutes ES384 because the underlying 'jsonwebtoken' crate (v10.x) lacks ES512 support. This root cause leads to a curve mismatch: users providing P-521 keys (required for ES512) encounter handshake failures as the system attempts to process them using ES384 (which requires P-384). While ES384 remains cryptographically secure, the silent downgrade impacts availability and interoperability with external systems expecting ES512 signatures. The issue is resolved in v3.1.0 by blocking ES512 configurations with an error message.

Affected products

  • SurrealDB SurrealDB < 3.1.0

Timeline

  • 2026-05-27: disclosed: Initial disclosure in surrealdb/surrealdb repository
  • 2026-07-01: advisory: GitHub Advisory published
  • 2026-07-01: patched: Version 3.1.0 released with fix

References

Related threats