Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@reddb-io/client

Latest version: v1.43.4

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: fforattini
43 Stars
3 Forks
163 Versions
23.5K Downloads
Rust Repo language

Scan summary

@reddb-io/client was last scanned on 29 Nov 2026 at version 1.43.4. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 163 versions; the latest 5 were published within 2 days (28 and 29 Nov 2026).
  • Findings: No rules fired in version 1.43.4.
  • Downloads: 23,540 downloads.

Versions

163 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.43.4 LATEST 29 Nov 2026 No rules fired
1.43.3 28 Nov 2026 No rules fired
1.43.2 28 Nov 2026 No rules fired
1.43.1 28 Nov 2026 Not shown
1.43.0 28 Nov 2026 Not shown

No rules fired in 1.43.4

Findings

Findings for v1.43.4. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.43.4; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@reddb-io/client

Thin remote-only RedDB driver for JavaScript and TypeScript. Speaks RedWire (TCP + mTLS), gRPC, and HTTP straight to a remote RedDB server. Ships the red_client thin binary for an ad-hoc REPL — about 10x smaller than @reddb-io/sdk.

This package is the remote counterpart to the embedded-only @reddb-io/sdk.

Embedded engines (memory://, file:///path) are intentionally rejected by this package. Use @reddb-io/sdk instead if you need an in-process database.

When to use this package

You want… Install
Connect to a running RedDB server (most apps) @reddb-io/client
Same, plus the ability to spin up a local engine @reddb-io/sdk
The CLI launcher (reddb-cli) @reddb-io/cli

All three packages stay version-locked.

Install

pnpm add @reddb-io/client
# or
npm install @reddb-io/client

This package is pure JavaScript: it has no install scripts and downloads no binary, so it installs the same way on every platform and works with --ignore-scripts. It speaks the wire protocols directly from JS. For the red / red_client CLI, install @reddb-io/cli.

Quickstart

import { connect } from '@reddb-io/client'

const db = await connect('red://reddb.example.com:5050', {
  auth: { token: process.env.REDDB_TOKEN },
})

await db.insert('users', { name: 'Alice' })
const result = await db.query('SELECT * FROM users WHERE name = $1', 'Alice')
console.log(result.rows)

const doc = await db.documents.insert('events', { event_type: 'login' })
await db.documents.patch('events', doc.rid, { reviewed: true })

await db.query('CREATE KV settings')
const kv = db.kv('settings')
await kv.put('characters:hansel', 'crumbs')
console.log(await kv.get('characters:hansel'))

await db.queues.create('jobs')
await db.queues.push('jobs', { task: 'email', orderId: 42 }, { dedup: 'outbox:email:42' })
await db.queues.push(
  'jobs',
  { task: 'rebuild_account', accountId: 'acct_123' },
  { key: 'acct_123' },
)

await db.close()

Use db.query(sql, ...params) or db.execute(sql, ...params) for parameterized statements. The compatibility form db.query(sql, paramsArray) is still accepted.

For http:// and https:// connections, connect() verifies readiness with a lightweight SELECT 1 round-trip. /health states such as degraded are transient during boot and are not fatal as long as queries succeed.

RedWire query parameters retain Float32Array, Float64Array, Uint8Array and Buffer views through normalization, avoiding intermediate number arrays and base64 strings. The request owns its encoded bytes before query() yields; later mutations of caller-owned views do not change the sent request. The transport drops input-view references before waiting for the network. HTTP/gRPC keep the same JSON-compatible parameter envelopes. See the measured encoding results.

Transactions

Use db.transaction() when a group of writes must commit or roll back together. The callback receives a transaction handle with the same query, insert, and bulkInsert methods as db.

const userId = await db.transaction(async (tx) => {
  const inserted = await tx.insert('users', { name: 'Ada' })
  await tx.query('INSERT INTO audit (action) VALUES ($1)', 'created user')
  return inserted.rid
})

The wrapper sends BEGIN, commits when the callback resolves, and rolls back when the callback or a tx.query() / tx.insert() call throws. Nested transactions on the same connection are rejected with NESTED_TX_NOT_SUPPORTED; open another connect() handle for independent concurrent transactions.

Streaming

db.query() stays a one-shot Promise — ideal for small reads. For large result sets or continuous ingest, use the explicit streaming surface so you never accidentally buffer a huge result or OOM. The surface is identical whether the connection is RedWire (red://) or HTTP (http://): RedWire is used when available, HTTP NDJSON otherwise.

// Read: a Node Readable that is also an AsyncIterable<Row>.
const users = db.collection('users')
for await (const row of users.stream('SELECT id, name FROM users')) {
  console.log(row.id, row.name)
}

// Write: a Node Writable; the server's terminal envelope resolves completion().
import { splitNdjson } from '@reddb-io/client'
import { createReadStream } from 'node:fs'
import { pipeline } from 'node:stream/promises'

const sink = users.inputStream() // columns inferred from the first row's keys
await pipeline(createReadStream('rows.ndjson'), splitNdjson(), sink)
const { row_count } = await sink.completion()

Backpressure flows naturally: the Readable via read() / pause() / resume(), the Writable via write()'s return value and the 'drain' event. Both expose .cancel(reason?) — a StreamCancel over RedWire, an AbortController.abort() over HTTP — which terminates the underlying transport stream and rejects any pending iteration (or .completion()) with a STREAM_CANCELLED error. A mid-stream server error surfaces as an 'error' event and as a rejected iteration. db.stream(sql) / db.inputStream(target) are also available directly on the connection without a collection() handle.

Rich Helpers

The client follows the SDK Helper Spec for the shared JS/TS surface:

  • db.insert(collection, payload) returns { affected, rid, id }; id is a legacy alias for rid.
  • db.bulkInsert(collection, payloads) returns { affected, rids, ids }; ids is a legacy alias for rids.
  • db.documents.insert/get/list/patch/delete covers document CRUD. Insert creates the document collection when needed; patch currently accepts top-level fields.
  • db.kv(collection?) preserves exact keys, including namespaced keys such as characters:hansel, and exposes put/get/exists/delete/list.
  • db.queue exposes push/pop/peek/len/purge/readWait/readWaitEntries. On RedWire, a single-message readWait uses the native async queue-wait frame, so an idle consumer does not occupy an engine execution worker. readWaitEntries preserves message_id, consumer, and delivery_count for ACK/NACK handling. Multi-message waits retain the SQL compatibility path until the wire protocol has an explicit terminal frame.

Accepted URI schemes

Scheme Transport Default port
red:// RedWire (TCP) 5050
reds:// RedWire over TLS 5050
grpc:// gRPC 55055
grpcs:// gRPC over TLS 55555
http:// HTTP JSON 5000
https:// HTTPS JSON 55555
ws:// RedWire over WebSocket 80
wss:// RedWire over WebSocket + TLS 443
red+ws:// RedWire over WebSocket 80
red+wss:// RedWire over WebSocket + TLS 443

Browser bundles cannot open raw TCP, so use wss://host (or ws://host for plaintext development origins) when connecting directly from browser JavaScript.

Rejected URI schemes

memory://, memory:, file:///abs/path, red://, red:///path, red://:memory, red://:memory: — all throw EmbeddedNotSupported with the same wording as the underlying red_client binary:

embedded schemes (memory:// / file://) are not supported. Use the full red binary for in-memory or file-backed engines.

Authentication

// Bearer / API key
await connect('red://host:5050', { auth: { token: 'sk-abc' } })

// or via the URI:
await connect('red://host:5050?token=sk-abc')

// Username + password (driver calls /auth/login first):
await connect('red://user:pass@host:5050')

License

MIT.

Public-surface support

Generated from docs/conformance/public-surface-contract-matrix.json by scripts/gen-docs-from-matrix.mjs. Do not edit between the markers by hand — run node scripts/gen-docs-from-matrix.mjs --write. The matrix is the source of truth; this block can never claim more than it, and CI (docs-matrix) fails on drift.

Driver-helper (SDK Helper Spec v1.0) support for every public promise. A helper not marked supported here is not promised by this driver.

Promise driver_helpers
PSC-001 — RedDB is one multi-model database (tables, graph, KV, timeseries, probabilistic, vector, queue, documents) backed by a single file. ✅ supported
PSC-002 — MATCH supports node, edge, label, property, and LIMIT projections. ✅ supported
PSC-003 — GRAPH algorithms accept semantic identifiers, limits, ordering, and return stable rich rows. ❌ unsupported
PSC-004 — INSERT creates rows, documents, and native timeseries points. ✅ supported
PSC-005 — HLL/SKETCH/FILTER expose write and read commands for cardinality, frequency, and membership. ⚠️ partial
PSC-006 — Timeseries stores timestamped metrics with tags and supports query/readback. ⚠️ partial
PSC-007 — Documents are first-class: create, read, update, delete, and SQL analytics over JSON. ✅ supported
PSC-008 — KV helpers expose get/put/delete; get of a missing key returns null, delete reports affected. ✅ supported
PSC-009 — Queue helpers expose create/push/peek/pop/len/purge with FIFO semantics; empty pop is not an error. ✅ supported
PSC-010 — Transactions are imperative (begin/commit/rollback) plus a run(callback) form; empty SQL rejects with INVALID_ARGUMENT. ✅ supported
PSC-011 — SQL aggregate, projection, expression, and mutation behaviour matches ordinary SQL expectations where advertised. ✅ supported
PSC-012 — Server transports expose the same query contract as embedded (HTTP, RedWire, gRPC parity). ✅ supported
PSC-013 — Official drivers implement the SDK Helper Spec v1.0 conformance suite (all 22 §12 case IDs). ✅ supported
PSC-014 — ASK / SEARCH semantic surfaces return ranked results with stable shape. ⚠️ partial

Status legend: ✅ supported · ⚠️ partial (known gaps) · ❌ unsupported.

SQL quotation compatibility

SQL double quotes delimit identifiers; single quotes delimit text. For example, SELECT "title" FROM articles WHERE author = 'alice' reads the title column. Bind application values as parameters. JSON object/array strings keep double quotes. See the SQL quotation migration guide before upgrading applications that used double-quoted SQL text literals.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @reddb-io/client

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229