Repository navigation
v0.6.2
Security patch. Upgrade if you expose /sql to anything. Drop-in from 0.6.x - no data migration, no config or flag changes, sealed segments and hot store preserved.
The fix
/sql accepted ;-stacked statements, which was an arbitrary file write.
The guard inspected only the first statement in a query. conn.prepare on the bundled duckdb-rs is not single-statement - it prepares and executes input like SELECT 1; COPY … TO '/path' - and COPY … TO / ATTACH write to disk regardless of the connection being in-memory. So a query opening with a permitted SELECT could carry a mutating statement behind a semicolon and write a file as the service user.
Fixed by reject_statement_stacking, a string-literal-aware guard, with regression tests.
Affected: 0.6.1 and earlier, wherever /sql is reachable by an untrusted caller. nuthatch binds 127.0.0.1 by default, so a localhost-only deployment was not exposed. Impact is bounded by the service user's filesystem permissions - running unprivileged, as the deploy recipes instruct, limits it to that user's writable paths.
No workaround short of upgrading if /sql is reachable: authentication in front does not help, because a caller reaching /sql is already past it.
Found in-house while writing a regression test intended to confirm a defence that turned out not to exist. Advisory: GHSA-jvjx-5528-r6mm.
Also measured
DuckDB's allowed_directories is not enforced on the build we bundle, so it was not providing the defence-in-depth its surrounding comments claimed. reject_file_access is the control that actually stops filesystem reads. The comments now state the measured behaviour, and a tripwire test fails if a future DuckDB bump makes that layer real.
Other changes since 0.6.1
- outbound-URL warning when a freshly-loaded nest declares non-loopback webhook/RPC/alert URLs
Authorization: Beareraccepted alongside?token=on the admin surface- chain-id verification now runs concurrently with a 5s deadline, so one dead endpoint cannot delay startup
- audit-tail test coverage: screen-component tamper,
fetch_shapefail-open, cold-seed i128 parity,abi.rsresponse parsing getrandomalignment and adeny.tomlcross-version parse fix- documentation: the operator guide now covers sizing, the failure model, a runbook, backups, known gaps and a go-live checklist
Verifying the download
Each archive ships with a .sha256 alongside it:
curl -fsSLO https://github.com/nuthatch-indexer/nuthatch/releases/download/v0.6.2/nuthatch-x86_64-unknown-linux-gnu.tar.gz
curl -fsSLO https://github.com/nuthatch-indexer/nuthatch/releases/download/v0.6.2/nuthatch-x86_64-unknown-linux-gnu.tar.gz.sha256
sha256sum -c nuthatch-x86_64-unknown-linux-gnu.tar.gz.sha256