Skip to main content

CVE-2026-134303 — Vulnerability in surrealkv — CVE Details

HIGH

Out-of-bounds read when decoding internal keys shorter than 16 bytes

Published November 3, 2026Updated November 21, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.18%). Schedule for your next planned update.

Does your project use an affected surrealkv version?

Paste your Cargo.lock to check it for CVE-2026-134303 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Cargo.lock

Summary

InternalKeyRef::from_encoded is a safe constructor whose only length check is debug_assert!(encoded.len() >= 16), which is compiled out in release builds. Its accessors perform unchecked length arithmetic on the slice: user_key() slices &encoded[..len - 16], trailer()/seq_num() pass len - 16 and timestamp() passes len - 8 to read_u64_be, which computes buffer.as_ptr().add(offset) and performs an 8-byte load. For a short slice the subtraction underflows usize, the pointer wraps below the allocation and eight bytes before the buffer are read (undefined behavior; confirmed with AddressSanitizer as a heap-buffer-overflow). In debug builds the same call panics instead.

The same invariant is missing at the on-disk decode boundary: BlockIterator::seek_next_entry rebuilds the current key from block bytes with upper-bound checks only, and BlockIterator::key() wraps it in InternalKeyRef, which surrealdb's kv-surrealkv backend then reads through key_ref.timestamp(). A crafted or corrupted SSTable therefore reaches the same unchecked subtraction without any unsafe at the call site.

1.2.0 rejects internal keys shorter than their 8-byte trailer before any accessor computes an offset and makes the accessors bounds-checked (fix in commit ac642f9, surrealdb 4.0.0 ships surrealkv 1.2.0).

Advisory Timeline

  • First published November 3, 2026 (23 days ago).
  • Last revised November 21, 2026 — 18 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Cargo
Update surrealkv to 1.2.0 or later
cargo update -p surrealkv --precise 1.2.0

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: crates.io (1).

PackageFixed In
surrealkv crates.io · Affected: All versions1.2.0

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.9 score means for each attack dimension.

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
Low

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L

Frequently Asked Questions

What is CVE-2026-134303?
Out-of-bounds read when decoding internal keys shorter than 16 bytes. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.9/10).
How do I check if my project is affected by CVE-2026-134303?
CVE-2026-134303 affects surrealkv. It has a 0.2% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-134303 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.9

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.18%
EPSS percentile: 4.4

This is a below-median EPSS score — only 4.4% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

RUSTSEC-2026-0452
GHSA-9fm9-c4h4-8g93

Related CVEs

  • CVE-2026-83816
    HIGH

    CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE

  • CVE-2026-83817
    HIGH

    CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Cargo.lock