{"id":"GHSA-p2j4-c4g6-rpf5","revision":"86198acff25840d3b60ed3bca446f78a","records":[{"revision":"86198acff25840d3b60ed3bca446f78a","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-p2j4-c4g6-rpf5","aliases":["CVE-2026-47735","GO-2026-5523"],"title":"Arc has an authenticated arbitrary local-file read via DuckDB I/O functions that bypasses RBAC table-level checks","description":"### Summary\n\nArc's user-SQL validator (`internal/api/query.go:ValidateSQLRequest`) blocked only `read_parquet(` and `arc_partition_agg(` via regex denylist. The broader DuckDB I/O function family — `read_csv_auto`, `read_csv`, `read_json`, `read_json_auto`, `read_text`, `read_blob`, `glob`, `parquet_metadata`, `parquet_schema`, `read_xlsx`, etc. — was not blocked. RBAC table-reference extraction inspected only `FROM`/`JOIN` clauses, so scalar table functions in the `SELECT` list slipped past both layers.\n\n### Impact\n\nAny authenticated user, including a token with `permissions: []`, can read arbitrary local files via:\n\n```\nPOST /api/v1/query\nAuthorization: Bearer <token>\n{\"sql\": \"SELECT * FROM read_csv_auto('/etc/passwd', header=false, columns={'l':'VARCHAR'}) LIMIT 5\"}\n```\n\nConfirmed reachable targets:\n\n- `auth.db` — bcrypt hashes for every API token, plus legacy SHA-256 rows.\n- `arc.toml` — S3 secrets, TLS keys.\n- `/proc/self/environ` — environment-variable secrets.\n- Cross-tenant Parquet files — bypasses RBAC because the tenant scope is enforced at the table layer, not on raw file paths.\n- SSRF when `httpfs` is loaded (any S3-backed deployment) — `read_csv_auto('http://169.254.169.254/latest/meta-data/...')` reaches instance metadata IPs.\n\n### Patches\n\nFixed in 2026.06.1 (PR #442) via a structural sandbox at the DuckDB layer:\n\n1. `SET GLOBAL allowed_directories = [...]` enumerates Arc's legitimate filesystem prefixes (storage roots + tier prefixes + import upload dir + compaction temp).\n2. `SET GLOBAL enable_external_access = false` (one-way at runtime).\n3. Verified by reading back the flag.\n\nAfter lockdown, DuckDB refuses to open any file outside the allowlist and refuses further `INSTALL`/`LOAD`. Already-loaded extensions remain callable.\n\n### Workarounds\n\n- Restrict API access to known-trusted networks via firewall rules.\n- Temporary mitigation: add `read_csv*`/`read_json*`/`glob` etc. to `dangerousSQLPattern` in `internal/api/query.go` pending 2026.06.1.\n\n### Credits\n\nReported by Alex Manson ([@NeuroWinter](https://github.com/NeuroWinter), https://neurowinter.com/) on 2026-05-19.","state":0,"publishedAt":"2026-06-08T23:51:19+00:00","modifiedAt":"2026-06-25T23:11:18.501045+00:00","affected":[{"ecosystem":"Go","name":"github.com/basekick-labs/arc","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.0.0-20260520141557-91bdc29d1a02"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/Basekick-Labs/arc/security/advisories/GHSA-p2j4-c4g6-rpf5","https://github.com/Basekick-Labs/arc/pull/442","https://github.com/Basekick-Labs/arc/commit/91bdc29d1a02178ccf8c66375eccf85203108dfb","https://github.com/Basekick-Labs/arc"],"sourceUrl":"https://github.com/advisories/GHSA-p2j4-c4g6-rpf5","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-p2j4-c4g6-rpf5","identifiers":["GHSA-p2j4-c4g6-rpf5","CVE-2026-47735","GO-2026-5523"]},"retained":false,"historicalAffected":[]}],"coverage":[]}