date: 2026-11-09 title: 'Spice v2.4.2 (Nov 9, 2026)' type: blog authors: [sgrebnov] tags: [release, security, http, snowflake, sql]
Spice v2.4.2 is now available! 🛠️
Spice v2.4.2 is a patch release that continues security hardening and fixes Snowflake key-pair authentication. Security fixes limit the nesting depth, the expanded size, and the memory use of SQL queries, and HTTP datasets refuse redirects to other internal hosts. The release also fixes several SQL, Spice Cayenne, and runtime issues.
Spice now limits the nesting depth, the expanded size, and the memory use of SQL queries. A query over a limit fails with HTTP 400 on /v1/sql, or with InvalidArgument on Flight SQL. The runtime continues to serve other queries. Before this release, any client that could send SQL could stop the runtime with one query. A deeply nested query overflowed the stack, and the process stopped with fatal runtime error: stack overflow, aborting. Other queries made one function or one plan allocate memory without a limit.
The checks apply to HTTP /v1/sql, /v1/nsql, Flight SQL statements and prepared statements, Flight SQL updates, and transactions. The checks cover these shapes:
+, ||, AND, or OR terms deeper than 512 levels fails. This includes a /v1/search where condition.ARRAY<ARRAY<…>> fails past 32 levels. A type such as INT[][]… fails past 64 levels.arrow_cast argument or a column type that a dataset declares, fails past 64 levels.GROUP BY that expands to more than 4096 grouping sets fails. CUBE of 13 expressions makes 8192 sets. 4096 is also the limit in PostgreSQL./v1/search request with more than 512 keywords fails with HTTP 400.These scalar functions now keep their output within runtime.query.memory_limit, or within a fixed cap:
lpad and rpad charge the whole output buffer to the memory limit. This includes an empty fill string and negative lengths. A query that does not fit fails with Resources exhausted.array_repeat and list_repeat charge the real size of a list, struct, binary, boolean, or NULL element. Before this release, they charged 1 byte for each copy of such an element.flatten_json_properties, json_tree, and flatten_json stop at 32 × max_bytes of output for one document. max_depth is limited to 128. A small JSON schema with repeated allOf or $ref entries no longer expands exponentially.truncate cuts text by characters, not bytes. Non-ASCII text made the query fail with Query driver task ended unexpectedly.Flight SQL metadata requests also have limits. GetSqlInfo info IDs and GetTables table types are limited to 1024 entries. GetTables and GetDbSchemas filter patterns are limited to 1024 bytes.
The limits are:
| Shape | Limit |
|---|---|
Expression depth, such as a chain of AND, OR, +, or || | 512 levels |
| Query nesting: subqueries, or CTEs that read each other | 64 levels |
| Table references after CTE expansion | 4096 |
SQL data type nesting with ARRAY, STRUCT, MAP, and similar keywords | 32 levels |
SQL data type nesting with [] | 64 levels |
| Arrow type string nesting | 64 levels |
GROUP BY grouping sets | 4096 (CUBE of up to 12 expressions) |
/v1/search keywords | 512 |
Flight SQL GetSqlInfo info IDs and GetTables table types | 1024 entries |
Flight SQL GetTables and GetDbSchemas filter patterns | 1024 bytes |
CTEs that do not read each other are not limited by depth. Table references outside of CTEs do not count toward the expansion limit.
GET /v1/datasets and GET /v1/catalogs no longer return credentials from the from value of a component. Before this release, any API key that could list components could read a password in a source URL, such as https://user:password@host/file.csv. This included a read-only key. The runtime now removes user:password@ from each URL. It replaces values of query keys such as password, secret, token, and sig with ***. With status=true, /v1/datasets also removes credentials from error_message. Sources with no credentials do not change.
The runtime also removes credentials from these errors and log lines:
adbc_uri. The runtime replaces each configured secret in the driver message with ***. Before this release, the full URI went to the warning log and to /v1/datasets?status=true..env files. The warning for a malformed line gives only the line number, not the line content.An http or https (opens in a new tab) dataset in a file format, such as CSV or Parquet, no longer follows a redirect to an internal host. An internal host is a different host that is a loopback, private, or link-local address, or that resolves to one. The dataset fails with this error:
The host of the dataset itself is always allowed, also when it is internal. Redirects that stay on that host still work. SPICE_URL_TABLE_ALLOW_PRIVATE_HOSTS=true turns off the check.
Snowflake (opens in a new tab) datasets with key-pair authentication now load correctly. Before this release, such a dataset stopped at Initializing with this error:
IS [NOT] DISTINCT FROM with AND or OR. These queries no longer return wrong boolean results or fail with an integer type error. For example, SELECT true IS DISTINCT FROM true OR true now returns true, not false. The comparison now binds before AND or OR.COUNT(DISTINCT …) on list or struct columns. A query with two or more COUNT(DISTINCT …) aggregates no longer fails with Resources exhausted when one of them reads a list or struct column. Before this release, the query failed at about 50,000 rows and requested tens of GB. Each stored value held a reference to its whole input batch. This applied to federated and Cayenne queries, with or without GROUP BY.stale_while_revalidate_ttl set on the SQL results cache (opens in a new tab), new client queries no longer wait behind background revalidations. In a test, 600 stale hits made the next uncached query wait 321.8 seconds, and 6.3 seconds with this fix. At most one quarter of the query admission limit runs revalidations at the same time. A stale hit over that limit gets the cached result with no revalidation, and results_cache_stale_swr_count counts it. The runtime cancels a revalidation after 5 minutes and records the outcome timed_out.truncate on numbers. truncate no longer returns wrong values for integers and decimals near the limits of their type. For example, truncate(100, arrow_cast(50, 'Int8')) returned 56, and the correct result is 0. A result that does not fit its type is now an error.from: sql scalar function with no arguments no longer fails on every call.spice HTTP commands, such as status and refresh, report a TLS certificate failure as a TLS error. In v2.4.1, the release build reported it as The Spice runtime is unavailable.arrow-rs (Spice fork): 59.3.0 → 59.3.2. This update fixes RUSTSEC-2026-0442 in run-end-encoded array validation, and it adds the 64-level limit for Arrow type strings.azure_security_keyvault_secrets: 0.10.0 → 1.0.1. This update fixes RUSTSEC-2026-0438 in the Azure Key Vault secret store. azure_identity and azure_core move to the 1.x line for that store.sqlparser: 0.62.0, vendored with the precedence fix from apache/datafusion-sqlparser-rs#2436.COUNT(DISTINCT …) memory and for nested SQL data types.Query limits. Queries and requests over the new limits fail with HTTP 400 or Flight InvalidArgument. Most of them stopped the runtime before this release, but some ran in v2.4.1. Examples are a GROUP BY CUBE of 13 expressions, a /v1/search request with more than 512 keywords, and a query whose CTEs expand to more than 4096 table references. For each limit, see SQL Query Limits Protect the Runtime (opens in a new tab).
HTTP dataset redirects. An http or https dataset in a file format fails when its server redirects to a different internal host. To allow it, set SPICE_URL_TABLE_ALLOW_PRIVATE_HOSTS=true.
JSON flattening. flatten_json, json_tree, and flatten_json_properties stop at 32 × max_bytes of output for one document (256 MiB by default). They return the rows up to that point, with no error. The limit is on output, so a small document with long, deeply nested keys can reach it. To get all rows, increase max_bytes.
To upgrade to v2.4.2, use one of the following methods:
CLI:
Homebrew:
Docker:
Pull the spiceai/spiceai:2.4.2 image:
For available tags, see DockerHub (opens in a new tab).
Helm:
AWS Marketplace:
Spice is available in the AWS Marketplace (opens in a new tab).
No new cookbook recipes.
The Spice Cookbook (opens in a new tab) provides recipes to help you get started with Spice.
from in /v1/datasets and /v1/catalogs by @lukekim (opens in a new tab) in #15834 (opens in a new tab)Full Changelog: https://github.com/spiceai/spiceai/compare/v2.4.1...v2.4.2 (opens in a new tab)