{"id":"CVE-2026-125327","aliases":["EUVD-2026-121709","GHSA-5qg5-rgp6-j5m5"],"status":"published","title":"pgEdge RAG Server unbounded corpus read allows resource exhaustion from unauthenticated requests","description":"pgEdge RAG Server is an API server for retrieval-augmented generation over PostgreSQL content using pgvector. Prior to 2.0.0, the unauthenticated query endpoint uses FetchDocuments in internal/database/search.go to read the entire filtered corpus without a LIMIT and rebuild an in-memory BM25 index on every request. Because HybridEnabled is set by default in internal/config/loader.go and the endpoint has no rate limit, inexpensive remote queries can impose database and CPU work proportional to corpus size and exhaust service resources. This issue is fixed in version 2.0.0.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00446,"percentile":0.39278,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-405","CWE-770"],"published":"2026-11-10T18:02:58Z","modified":"2026-11-12T20:45:03Z","fixes":[{"ecosystem":"Go","package":"github.com/pgEdge/pgedge-rag-server","fixed_in":["1.0.1-0.20260729020411-a09d4872356b"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/pgEdge/pgedge-rag-server","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.1-0.20260729020411-a09d4872356b"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/pgEdge/pgedge-rag-server","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.0.1-0.20260729020411-a09d4872356b"}]}]}],"products":[{"vendor":"pgedge","product":"pgedge-rag-server"}],"references":[{"url":"https://github.com/pgEdge/pgedge-rag-server/security/advisories/GHSA-5qg5-rgp6-j5m5","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/pgEdge/pgedge-rag-server/pull/44","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/pgEdge/pgedge-rag-server/commit/a09d4872356b510c81f11591845445c33ff45a84","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/pgEdge/pgedge-rag-server/releases/tag/v2.0.0","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-125327","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-5qg5-rgp6-j5m5"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125327.json","tags":["advisory"]},{"url":"https://github.com/pgEdge/pgedge-rag-server","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-125327","title":"pgEdge RAG Server unbounded corpus read allows resource exhaustion from unauthenticated requests","description":"pgEdge RAG Server is an API server for retrieval-augmented generation over PostgreSQL content using pgvector. Prior to 2.0.0, the unauthenticated query endpoint uses FetchDocuments in internal/database/search.go to read the entire filtered corpus without a LIMIT and rebuild an in-memory BM25 index on every request. Because HybridEnabled is set by default in internal/config/loader.go and the endpoint has no rate limit, inexpensive remote queries can impose database and CPU work proportional to corpus size and exhaust service resources. This issue is fixed in version 2.0.0.","status":"published","published":"2026-11-10T18:02:58.722Z","modified":"2026-11-12T18:02:40.029Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-405","CWE-770"],"updated_at":"2026-11-10T19:39:59.389041Z"}],"euvd":[{"id":"EUVD-2026-121709","description":"pgEdge RAG Server is an API server for retrieval-augmented generation over PostgreSQL content using pgvector. Prior to 2.0.0, the unauthenticated query endpoint uses FetchDocuments in internal/database/search.go to read the entire filtered corpus without a LIMIT and rebuild an in-memory BM25 index on every request. Because HybridEnabled is set by default in internal/config/loader.go and the endpoint has no rate limit, inexpensive remote queries can impose database and CPU work proportional to corpus size and exhaust service resources. This issue is fixed in version 2.0.0.","status":"published","published":"2026-11-10T18:02:58Z","modified":"2026-11-12T18:02:40Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-12T22:35:54.874659Z"}],"ghsa":[{"id":"GHSA-5qg5-rgp6-j5m5","title":"pgEdge RAG Server unbounded corpus read allows resource exhaustion from unauthenticated requests","description":"### Impact\n\nAn unauthenticated caller able to reach the query endpoint could exhaust database and server resources with ordinary, inexpensive requests.\n\nThe keyword-search arm read the entire corpus on every request and rebuilt an in-memory BM25 index from it, so the cost of serving a query scaled with the size of the source table rather than with the size of the result set. Each request cost the server and the tenant's database far more than it cost the caller to make, which makes this a materially more effective denial-of-service lever than flooding the endpoint with ordinary requests. The amplification factor grows with corpus size, so the largest deployments are the most exposed.\n\nHybrid search was enabled by default and configured per pipeline rather than per request, so a caller could not opt out of the keyword arm and an operator could not leave it available to some requests but not others.\n\n**Who is affected:** any deployment of pgEdge RAG Server at `1.0.0` or earlier, including all alpha and beta pre-releases, whose query endpoint is reachable by an untrusted party. The endpoint required no authentication and applied no rate limiting.\n\nIn `1.0.0`, `internal/database/search.go:130` built the corpus query with no `LIMIT`:\n\n```go\nquery = fmt.Sprintf(`\n    SELECT ...\n    FROM %s%s`,\n    tableIdent,\n    filterClause)\n```\n\n`FetchDocuments` accepted no limit parameter at all, so neither a caller nor the orchestrator had any way to bound the read.\n`internal/config/loader.go:197` defaulted `HybridEnabled` to true, and `internal/server/middleware.go:37` applied only logging, panic recovery and optional CORS.\n\n### Patches\n\n**Fixed in `2.0.0`. Upgrade to `2.0.0` or later.**\n\nReads are capped by a new per-pipeline `search.bm25_max_documents`, defaulting to 10000, plumbed through `SearchBackend.FetchDocuments` and applied as a parameterised `LIMIT`. There is deliberately no unlimited value: a non-positive setting is rejected at configuration load time rather than silently treated as unbounded.\n\nRequests that reach the cap are logged, because keyword recall is partial at that point and an operator should not have to infer it. A new `disable_hybrid` request field lets a caller skip the expensive arm per query, and can only ever turn it off.\n\n**After upgrading, review the default `search.bm25_max_documents` value of 10000 against the size of your corpus.** A cap far below corpus size silently reduces keyword recall.\n\n### Workarounds\n\nPlace the server behind an authenticating, rate-limiting reverse proxy.\n\nSetting `hybrid_enabled: false` on each pipeline removes the keyword arm and with it the unbounded read, at the cost of keyword recall. This is the only mitigation available without a proxy.\n\nNeither is a substitute for upgrading.","status":"published","published":"2026-11-12T20:37:38Z","modified":"2026-11-12T20:37:39Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-405","CWE-770"],"updated_at":"2026-11-12T20:43:14.1309Z"}],"nvd":[{"id":"CVE-2026-125327","description":"pgEdge RAG Server is an API server for retrieval-augmented generation over PostgreSQL content using pgvector. Prior to 2.0.0, the unauthenticated query endpoint uses FetchDocuments in internal/database/search.go to read the entire filtered corpus without a LIMIT and rebuild an in-memory BM25 index on every request. Because HybridEnabled is set by default in internal/config/loader.go and the endpoint has no rate limit, inexpensive remote queries can impose database and CPU work proportional to corpus size and exhaust service resources. This issue is fixed in version 2.0.0.","status":"published","published":"2026-11-10T19:21:09.977Z","modified":"2026-11-12T22:18:51.47Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-405","CWE-770"],"updated_at":"2026-11-10T22:21:33.392456Z"}],"osv":[{"id":"CVE-2026-125327","title":"pgEdge RAG Server unbounded corpus read allows resource exhaustion from unauthenticated requests","description":"pgEdge RAG Server is an API server for retrieval-augmented generation over PostgreSQL content using pgvector. Prior to 2.0.0, the unauthenticated query endpoint uses FetchDocuments in internal/database/search.go to read the entire filtered corpus without a LIMIT and rebuild an in-memory BM25 index on every request. Because HybridEnabled is set by default in internal/config/loader.go and the endpoint has no rate limit, inexpensive remote queries can impose database and CPU work proportional to corpus size and exhaust service resources. This issue is fixed in version 2.0.0.","status":"published","published":"2026-11-10T18:02:58.722Z","modified":"2026-11-13T10:30:41.747683454Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-405","CWE-770"],"updated_at":"2026-11-12T03:30:48.739835Z"},{"id":"GHSA-5qg5-rgp6-j5m5","title":"pgEdge RAG Server unbounded corpus read allows resource exhaustion from unauthenticated requests","description":"### Impact\n\nAn unauthenticated caller able to reach the query endpoint could exhaust database and server resources with ordinary, inexpensive requests.\n\nThe keyword-search arm read the entire corpus on every request and rebuilt an in-memory BM25 index from it, so the cost of serving a query scaled with the size of the source table rather than with the size of the result set. Each request cost the server and the tenant's database far more than it cost the caller to make, which makes this a materially more effective denial-of-service lever than flooding the endpoint with ordinary requests. The amplification factor grows with corpus size, so the largest deployments are the most exposed.\n\nHybrid search was enabled by default and configured per pipeline rather than per request, so a caller could not opt out of the keyword arm and an operator could not leave it available to some requests but not others.\n\n**Who is affected:** any deployment of pgEdge RAG Server at `1.0.0` or earlier, including all alpha and beta pre-releases, whose query endpoint is reachable by an untrusted party. The endpoint required no authentication and applied no rate limiting.\n\nIn `1.0.0`, `internal/database/search.go:130` built the corpus query with no `LIMIT`:\n\n```go\nquery = fmt.Sprintf(`\n    SELECT ...\n    FROM %s%s`,\n    tableIdent,\n    filterClause)\n```\n\n`FetchDocuments` accepted no limit parameter at all, so neither a caller nor the orchestrator had any way to bound the read.\n`internal/config/loader.go:197` defaulted `HybridEnabled` to true, and `internal/server/middleware.go:37` applied only logging, panic recovery and optional CORS.\n\n### Patches\n\n**Fixed in `2.0.0`. Upgrade to `2.0.0` or later.**\n\nReads are capped by a new per-pipeline `search.bm25_max_documents`, defaulting to 10000, plumbed through `SearchBackend.FetchDocuments` and applied as a parameterised `LIMIT`. There is deliberately no unlimited value: a non-positive setting is rejected at configuration load time rather than silently treated as unbounded.\n\nRequests that reach the cap are logged, because keyword recall is partial at that point and an operator should not have to infer it. A new `disable_hybrid` request field lets a caller skip the expensive arm per query, and can only ever turn it off.\n\n**After upgrading, review the default `search.bm25_max_documents` value of 10000 against the size of your corpus.** A cap far below corpus size silently reduces keyword recall.\n\n### Workarounds\n\nPlace the server behind an authenticating, rate-limiting reverse proxy.\n\nSetting `hybrid_enabled: false` on each pipeline removes the keyword arm and with it the unbounded read, at the cost of keyword recall. This is the only mitigation available without a proxy.\n\nNeither is a substitute for upgrading.","status":"published","published":"2026-11-12T20:37:38Z","modified":"2026-11-12T20:45:03.505205185Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-405","CWE-770"],"updated_at":"2026-11-12T21:15:35.293334Z"}]}}
