{"vuln_id":"GHSA-rw2c-8rfq-gwfv","aliases":[],"description":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-11-21T19:15:19.317176Z","severity":"unknown","severity_source":null,"cvss_score":null,"cvss_vector":null,"cwe":[],"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-rw2c-8rfq-gwfv"},"matched_alias":null,"items":[{"id":10962,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-hq2p-f2vj-v3cm: Daptin: Unauthenticated SQL Injection via the `sort` query parameter on every entity list endpoint","summary":"Daptin: Unauthenticated SQL Injection via the `sort` query parameter on every entity list endpoint\n\n### Summary\n\nAn unauthenticated attacker can inject arbitrary SQL through the `sort` query parameter accepted by\nDaptin's generic entity list endpoint (`GET /api/\n`), which every table in a Daptin instance\nexposes. The parameter is concatenated into raw SQL identifiers with no validation that the\nreferenced column exists, unlike a sibling code path in the same file that received exactly this\nvalidation as the fix for a previously published advisory\n([GHSA-rw2c-8rfq-gwfv](https://github.com/daptin/daptin/security/advisories/GHSA-rw2c-8rfq-gwfv)).\nImpact ranges from unauthenticated denial of service (a single crafted request 500s the query) to\nblind/error-based extraction of data from tables the requester has no permission to read.\n\n### Details\n\n`PaginatedFindAllWithoutFilters` in `server/resource/resource_findallpaginated.go` reads the `sort`\nquery parameter directly from the request with no validation:\n\n```go\n// server/resource/resource_findallpaginated.go:300-302\nvar sortOrder []string\nif len(req.QueryParams[\"sort\"]) > 0 {\nsortOrder = req.QueryParams[\"sort\"]\n```\n\nEach entry is then concatenated with the table name and passed to `goqu.I()` (goqu's raw SQL\n*identifier* constructor) in two separate places, with no check that the referenced column exists\non the table:\n\n```go\n// server/resource/resource_findallpaginated.go:435-449 (SELECT column list)\nfor _, sort := range sortOrder {\n...\nif strings.Index(sort, \"(\") == -1 {\nsort = prefix + sort\n}\nidQueryCols = append(idQueryCols, goqu.I(sort).As(strings.ReplaceAll(sort, \".\", \"_\")))\n}\n```\n\n```go\n// server/resource/resource_findallpaginated.go:916-943 (ORDER BY clause)\nfor _, so := range sortOrder {\n...\norders = append(orders, goqu.I(ord).Asc())\n}\n```\n\n`goqu.I()` renders its argument by wrapping it in the dialect's quote character (a backtick, in\nthis build's configured dialect) **without escaping an embedded quote character of the same kind**.\nA backtick supplied in `sort` closes the identifier early, and the remainder of the attacker string\nis parsed as raw SQL grammar rather than treated as inert column-name text.\n\nThis is the same bug class as GHSA-rw2c-8rfq-gwfv (\"SQL injection via unvalidated `goqu.L()` calls\nin aggregate API\", CWE-89, fixed in v0.11.4). That fix added an allow-list check a few hundred lines\nlater in the same file, in the fuzzy-search code path:\n\n```go\n// server/resource/resource_findallpaginated.go:1491-1505\n// Validate each column against table schema (prevents SQL injection via goqu.L)\ntableInfo := dbResource.tableInfo\nvar validColumns []string\nfor _, col := range columns {\nif _, ok := tableInfo.GetColumnByName(col); ok {\nvalidColumns = append(validColumns, col)\n} else {\nlog.Warnf(...)\n}\n}\n```\n\nThe identical validation was never applied to the base `sort` parameter handling earlier in the\nsame file. Unlike fuzzy search (which requires an explicit `filter` operator to reach), plain `sort`\nis processed on ever\n\nAffected: Go:github.com/daptin/daptin\n\nFixed in: 0.12.30\n\nReferences:\nhttps://github.com/daptin/daptin/security/advisories/GHSA-hq2p-f2vj-v3cm\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-77367\nhttps://github.com/daptin/daptin/commit/b0bcc1318832b9055781f032853ef9d2264652cf\nhttps://github.com/daptin/daptin\nhttps://github.com/daptin/daptin/releases/tag/v0.12.30","url":"https://osv.dev/vulnerability/GHSA-hq2p-f2vj-v3cm","published_at":"2026-11-20T00:13:19Z","updated_at":"2026-11-20T00:30:07.873840Z","fetched_at":"2026-11-21T19:15:55.946333Z","severity":"critical","cvss_score":9.4,"epss":0.00604,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/daptin/daptin","vuln_id":"CVE-2026-77367","vuln_ids":["CVE-2026-77367","GHSA-HQ2P-F2VJ-V3CM","GHSA-RW2C-8RFQ-GWFV"],"tags":["osv","go","fix-available"],"cluster_id":2088,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10962","html":"https://vulnwatch.ve1ve2.com/item/10962"}},{"id":2332,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-hq2p-f2vj-v3cm / CVE-2026-77367: Daptin: Unauthenticated SQL Injection via the `sort` query parameter on every entity list endpoint","summary":"Daptin: Unauthenticated SQL Injection via the `sort` query parameter on every entity list endpoint\n\n### Summary\n\nAn unauthenticated attacker can inject arbitrary SQL through the `sort` query parameter accepted by\nDaptin's generic entity list endpoint (`GET /api/\n`), which every table in a Daptin instance\nexposes. The parameter is concatenated into raw SQL identifiers with no validation that the\nreferenced column exists, unlike a sibling code path in the same file that received exactly this\nvalidation as the fix for a previously published advisory\n([GHSA-rw2c-8rfq-gwfv](https://github.com/daptin/daptin/security/advisories/GHSA-rw2c-8rfq-gwfv)).\nImpact ranges from unauthenticated denial of service (a single crafted request 500s the query) to\nblind/error-based extraction of data from tables the requester has no permission to read.\n\n### Details\n\n`PaginatedFindAllWithoutFilters` in `server/resource/resource_findallpaginated.go` reads the `sort`\nquery parameter directly from the request with no validation:\n\n```go\n// server/resource/resource_findallpaginated.go:300-302\nvar sortOrder []string\nif len(req.QueryParams[\"sort\"]) > 0 {\nsortOrder = req.QueryParams[\"sort\"]\n```\n\nEach entry is then concatenated with the table name and passed to `goqu.I()` (goqu's raw SQL\n*identifier* constructor) in two separate places, with no check that the referenced column exists\non the table:\n\n```go\n// server/resource/resource_findallpaginated.go:435-449 (SELECT column list)\nfor _, sort := range sortOrder {\n...\nif strings.Index(sort, \"(\") == -1 {\nsort = prefix + sort\n}\nidQueryCols = append(idQueryCols, goqu.I(sort).As(strings.ReplaceAll(sort, \".\", \"_\")))\n}\n```\n\n```go\n// server/resource/resource_findallpaginated.go:916-943 (ORDER BY clause)\nfor _, so := range sortOrder {\n...\norders = append(orders, goqu.I(ord).Asc())\n}\n```\n\n`goqu.I()` renders its argument by wrapping it in the dialect's quote character (a backtick, in\nthis build's configured dialect) **without escaping an embedded quote character of the same kind**.\nA backtick supplied in `sort` closes the identifier early, and the remainder of the attacker string\nis parsed as raw SQL grammar rather than treated as inert column-name text.\n\nThis is the same bug class as GHSA-rw2c-8rfq-gwfv (\"SQL injection via unvalidated `goqu.L()` calls\nin aggregate API\", CWE-89, fixed in v0.11.4). That fix added an allow-list check a few hundred lines\nlater in the same file, in the fuzzy-search code path:\n\n```go\n// server/resource/resource_findallpaginated.go:1491-1505\n// Validate each column against table schema (prevents SQL injection via goqu.L)\ntableInfo := dbResource.tableInfo\nvar validColumns []string\nfor _, col := range columns {\nif _, ok := tableInfo.GetColumnByName(col); ok {\nvalidColumns = append(validColumns, col)\n} else {\nlog.Warnf(...)\n}\n}\n```\n\nThe identical validation was never applied to the base `sort` parameter handling earlier in the\nsame file. Unlike fuzzy search (which requires an explicit `filter` operator to reach), plain `sort`\nis processed on ever\n\nAffected packages: go:github.com/daptin/daptin\nPatched: github.com/daptin/daptin 0.12.30","url":"https://github.com/advisories/GHSA-hq2p-f2vj-v3cm","published_at":"2026-11-20T00:13:19Z","updated_at":"2026-11-20T00:13:19Z","fetched_at":"2026-11-21T19:15:18.416756Z","severity":"critical","cvss_score":9.4,"epss":0.00604,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/daptin/daptin","vuln_id":"CVE-2026-77367","vuln_ids":["CVE-2026-77367","GHSA-HQ2P-F2VJ-V3CM","GHSA-RW2C-8RFQ-GWFV"],"tags":["ghsa","go","CWE-20","CWE-89"],"cluster_id":2088,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2332","html":"https://vulnwatch.ve1ve2.com/item/2332"}}]}