{"vuln_id":"GHSA-9qq5-422f-33c2","aliases":["CVE-2026-85737"],"description":"Velociraptor: Low-priv analyst reads arbitrary server files via ungated sql() VQL plugin","published_at":"2026-11-09T22:25:14Z","modified_at":"2026-11-23T20:40:50.676841Z","first_seen_at":"2026-11-23T21:06:31.548288Z","severity":"medium","severity_source":"native","cvss_score":6.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","cwe":["CWE-862"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-9qq5-422f-33c2"},"matched_alias":null,"items":[{"id":16657,"source":{"id":"osv","name":"OSV.dev"},"title":"GO-2026-6952: Velociraptor: Low-priv analyst reads arbitrary server files via ungated sql() VQL plugin in www.velocidex.com/golang/velociraptor","summary":"Velociraptor: Low-priv analyst reads arbitrary server files via ungated sql() VQL plugin in www.velocidex.com/golang/velociraptor\n\nAffected: Go:www.velocidex.com/golang/velociraptor\n\nFixed in: 0.77.2\n\nReferences:\nhttps://github.com/Velocidex/velociraptor/security/advisories/GHSA-9qq5-422f-33c2\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-85737\nhttps://github.com/Velocidex/velociraptor/commit/d7de958e846d3742a7a3a8538fd463e4f12fc528\nhttps://github.com/Velocidex/velociraptor/commit/f25390f8fbd00c888f0b7aaba2c061a51c3f7082\nhttps://github.com/Velocidex/velociraptor/pull/4952\nhttps://github.com/Velocidex/velociraptor/releases/tag/v0.77.2","url":"https://osv.dev/vulnerability/GO-2026-6952","published_at":"2026-11-23T20:02:42Z","updated_at":"2026-11-23T20:30:12.599148Z","fetched_at":"2026-11-23T21:06:31.109649Z","severity":"medium","cvss_score":6.5,"epss":0.00397,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"www.velocidex.com/golang/velociraptor","vuln_id":"CVE-2026-85737","vuln_ids":["CVE-2026-85737","GHSA-9QQ5-422F-33C2","GO-2026-6952"],"tags":["osv","go","fix-available"],"cluster_id":14783,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/16657","html":"https://vulnwatch.ve1ve2.com/item/16657"}},{"id":16593,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-9qq5-422f-33c2: Velociraptor: Low-priv analyst reads arbitrary server files via ungated sql() VQL plugin","summary":"Velociraptor: Low-priv analyst reads arbitrary server files via ungated sql() VQL plugin\n\n## Summary\n\nThe `sql()` VQL plugin runs a caller-supplied database driver and connection string with no permission check (`vql/parsers/sql/sql.go:93`, `SQLPlugin.Call`). For `driver='mysql'` or `driver='postgres'` the handle comes from `GetHandleOther` (`sql.go:39`), which passes the connection string straight to Go `database/sql` `sql.Open` (`sql.go:51`) and executes the query (`sql.go:159`).\n\nThe plugin declares `FILESYSTEM_READ` only as `Info().Permissions` metadata (`sql.go:219`). That metadata is never consulted at runtime: `metadata.go:19` stores it as a string that only the documentation exporter reads (`api/reflect.go:82-110`). Every sibling network plugin (`http_client`, `netcat`, `s3`, `rsyslog`) calls `CheckAccess(acls.NETWORK)` in its own body; `sql()` calls nothing.\n\nThe built-in `analyst` role holds `ANY_QUERY` but not `FILESYSTEM_READ` or `NETWORK` (`acls/roles.go:222`), and reaches this sink through the notebook query API.\n\nResult: a low-priv analyst opens arbitrary outbound TCP connections and, through a rogue MySQL server's `LOAD DATA LOCAL INFILE`, reads any file the root-running server can read, including the deployment CA private key.\n\n## Affected\n\n- Velocidex/velociraptor server, `<= v0.77.1` (latest release, 2026-06-23). Identical vulnerable code in `master` HEAD `1961e79` (2026-07-17).\n- Confirmed live-exploitable on the official `ghcr.io/velocidex/velociraptor-server:latest` image (build 0.77.1, commit bbe2a58).\n- Stock install, default Basic authenticator, any built-in `analyst`, `investigator`, or `api` role (all hold `ANY_QUERY`, none holds `FILESYSTEM_READ` or `NETWORK`).\n- No non-default flag required.\n\n## Root cause\n\n`SQLPlugin.Call` (`vql/parsers/sql/sql.go:93`) parses the caller `driver`, `connstring`, and `query` arguments and reaches `handle.Query` (`sql.go:159`) without any `vql_subsystem.CheckAccess` call in its body. For `driver='mysql'` or `driver='postgres'` the handle comes from `GetHandleOther` (`sql.go:39`), which hands the attacker connection string to `sql.Open` (`sql.go:51`), so the plugin dials an arbitrary host and, through the MySQL client `LOAD DATA LOCAL INFILE` feature, reads local files. The plugin states its intended gate only as metadata, `VQLMetadata().Permissions(acls.FILESYSTEM_READ)` (`sql.go:219`), but `MetadataBuilder.Permissions` merely stores a string (`vql/metadata.go:19`) that is read only by the reflection exporter (`api/reflect.go:82-110`), never by the query engine. Every sibling network plugin enforces `CheckAccess(acls.NETWORK)` in its own body, so the omission in `sql()` is an enforcement oversight. The default `analyst` role grants `ANY_QUERY` without `FILESYSTEM_READ` or `NETWORK` (`acls/roles.go:222`), so a user the operator deliberately restricted still reaches the ungated sink.\n\nNote on intent: `acls/acls.go` documents that specific permission combinations grant admin-equivalent power (`SERVER_ARTIFACT_WRITER` with `COLLECT_SERVER`, `ARTIFACT_WRITER` with `COLLECT_CLIENT`\n\nAffected: Go:www.velocidex.com/golang/velociraptor\n\nFixed in: 0.77.2\n\nReferences:\nhttps://github.com/Velocidex/velociraptor/security/advisories/GHSA-9qq5-422f-33c2\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-85737\nhttps://github.com/Velocidex/velociraptor/pull/4952\nhttps://github.com/Velocidex/velociraptor/commit/d7de958e846d3742a7a3a8538fd463e4f12fc528\nhttps://github.com/Velocidex/velociraptor/commit/f25390f8fbd00c888f0b7aaba2c061a51c3f7082\nhttps://github.com/Velocidex/velociraptor\nhttps://github.com/Velocidex/velociraptor/releases/tag/v0.77.2","url":"https://osv.dev/vulnerability/GHSA-9qq5-422f-33c2","published_at":"2026-11-09T22:25:14Z","updated_at":"2026-11-23T20:40:50.676841Z","fetched_at":"2026-11-23T21:06:31.109593Z","severity":"medium","cvss_score":6.5,"epss":0.00397,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"mysql","product":"www.velocidex.com/golang/velociraptor","vuln_id":"CVE-2026-85737","vuln_ids":["CVE-2026-85737","GHSA-9QQ5-422F-33C2","GO-2026-6952"],"tags":["osv","go","fix-available"],"cluster_id":14782,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/16593","html":"https://vulnwatch.ve1ve2.com/item/16593"}}]}