@claude-flow/plugins@3.0.1

ruvnet/ruflo@claude-flow/plugins@3.0.1Sep 30, 2026by ruvnet

Upgrading?

AI Summary

A standalone security release fixing critical SQL injection vulnerabilities in the RuVector GNN SQL builders. It introduces strict input validation for identifiers, strings, and JSON.

Key Highlights

  • Critical security fix: SQL injection in `BaseGNNLayer.toSQL()` and related builders.
  • Input validation enforces identifier regex, string escaping, and number validation.
  • Adds quoting for `nodeColumn` identifiers.
  • Unsafe input now throws `TypeError` instead of producing SQL.

Breaking Changes

  • Non-plain identifiers (e.g., `my-table`) are now rejected by the builders.

New Features

  • Strict validation for SQL input parameters.
  • Escaping of JSON config before embedding in `jsonb`.

Full Release Notes

## Security fix: SQL injection in the RuVector GNN SQL builders

`npm install @claude-flow/plugins@3.0.1`. All dist-tags (`latest`, `alpha`, `v3alpha`) point to 3.0.1.

**Who is affected:** code that calls the SQL-generating methods in `integrations/ruvector/gnn.ts` with input it doesn't fully control, then runs the result against PostgreSQL/RuVector. This applies to `@claude-flow/plugins` **3.0.0 and earlier**. Affected methods: `BaseGNNLayer.toSQL()` (every GNN layer), `GraphOperations.kHopNeighborsSQL/shortestPathSQL/pageRankSQL/communityDetectionSQL`, and the `GNNSQLGenerator` static builders. `gnn.js` isn't in the package's `exports` map, so it is only reachable by importing the file by path.

**What was wrong:** node ids, `source`/`target` and the community algorithm name were placed inside single quotes (`WHERE target_id = '${nodeId}'`), so a `'` broke out of the literal. `schema`/`table`/`edgeTable`/`cacheTable` identifiers were wrapped in `"โ€ฆ"`, which doesn't help when the value contains `"`. `nodeColumn` wasn't quoted at all. Numbers (`k`, `damping`, `maxIterations`, `resolution`, `dimension`), layer-config JSON and the prepared-statement `paramPrefix` were interpolated unchecked.

**What changed:** every interpolation now goes through a validator. Identifiers must match `^[A-Za-z_][A-Za-z0-9_]*$` and are quoted. Strings are single-quote-escaped. Numbers must be finite, or integers with a minimum where that makes sense. JSON config is escaped before it is embedded in `jsonb`. Unsafe input throws `TypeError` instead of producing SQL. Legitimate input produces the same SQL as before, except that `nodeColumn` is now quoted. This mirrors the `attention.ts` hardening in #3530.

**What to do:** upgrade to 3.0.1. There are no API changes. If you pass non-plain identifiers (such as `my-table` or `schema.table` strings), the builders now reject them, so map them to plain identifiers first.

## Verification
- A new 25-test injection suite fails 22 tests against the old code and passes against the fix. The full plugins suite (473 passed / 3 skipped) is unchanged, and all 110 CI checks passed on the release PR.
- **Published artifact:** in a fresh `npm install` of 3.0.1, an exploit smoke test passes 8/8. Against 3.0.0 as a control, the same test fails 7/8.
- **Tarball:** the registry tarball is file-for-file identical to `npm pack` of a clean build at `3bcf7e96a`. `dist.integrity` is `sha512-cl86h1eEs5sgCRtenrh4XablDmSQmSEjZRaYOOdwUDMRBz38O1NymS4KJyfVWA49nJ/2A4jIlHi1GtBipxbodw==`.

Fixes #3531 ยท Fix: #3564 ยท Release: #3574

This is a standalone `@claude-flow/plugins` release. The `@claude-flow/cli` / `claude-flow` / `ruflo` train is unchanged (latest train release: v3.48.0).

**Full write-up** (affected surface, before/after examples, validation, artifact integrity): https://gist.github.com/ruvnet/1cb9c6894394d5f51cf9e8f52b2ddcc4

๐Ÿค– Generated with [RuFlo](https://github.com/ruvnet/ruflo)

Related Repositories