{"id":"CVE-2026-112306","kind":"vulnerability","aliases":["CVE-2026-112306"],"related":[],"title":"NocoBase collection-sql plugin: privileged users can run arbitrary SQL","description":"NocoBase @nocobase/plugin-collection-sql through 2.2.28 contains an SQL injection vulnerability that allows privileged users to store unvalidated SQL by bypassing checkSQL() through the sqlCollection:setFields action. Attackers holding the collection-sql snippet can replace a benign collection query with dangerous statements executed on reload, reading pg_shadow password hashes or calling pg_read_file.","summary":"The @nocobase/plugin-collection-sql plugin through 2.2.28 lets a privileged user store SQL that bypasses the checkSQL() validation via the sqlCollection:setFields action. The stored query runs on reload, so an attacker can read database password hashes (pg_shadow) or read server files (pg_read_file).","severity":"high","cvss":8.6,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["nocobase","package","postgresql","self-hosted"],"not_affected_if":["no-untrusted-privileged-users","plugin-collection-sql-not-installed"],"how_to_check":"Check the installed version of @nocobase/plugin-collection-sql in package.json or the lockfile; versions through 2.2.28 are affected.","fix":"Upgrade @nocobase/plugin-collection-sql past 2.2.28; the sources do not name the fixed version.\nRotate database credentials if untrusted users had snippet-edit rights.","status":"open","published_at":"2026-10-19T16:17:06+00:00","first_seen_at":"2026-10-23T21:57:18+00:00","triaged_at":"2026-10-23T22:39:46+00:00","updated_at":"2026-10-23T22:39:46+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-23T22:39:46Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade @nocobase/plugin-collection-sql past 2.2.28; the sources do not name the fixed version.\nRotate database credentials if untrusted users had snippet-edit rights.","reach":"network","title":"NocoBase collection-sql plugin: privileged users can run arbitrary SQL","impact":"high","summary":"The @nocobase/plugin-collection-sql plugin through 2.2.28 lets a privileged user store SQL that bypasses the checkSQL() validation via the sqlCollection:setFields action. The stored query runs on reload, so an attacker can read database password hashes (pg_shadow) or read server files (pg_read_file).","category":"package","who_cares":["nocobase","self-hosted","postgresql"],"confidence":0.7,"needs_auth":"yes","worst_case":"Attacker reads database password hashes and server files via stored SQL","analyst_note":"Find the fixed version number and confirm the default install includes this plugin; check the NVD page and the NocoBase advisory.","how_to_check":"Check the installed version of @nocobase/plugin-collection-sql in package.json or the lockfile; versions through 2.2.28 are affected.\nunknown","needs_analyst":true,"not_affected_if":["plugin-collection-sql-not-installed","no-untrusted-privileged-users"],"user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000543,"input_tokens":2960,"output_tokens":494,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-112306':14A,17A '-2026':13A,16A '2.2.28':28B,71C 'action':44B,92C 'allow':78C 'arbitrari':10A 'attack':53B,93C 'benign':103C 'bypass':36B,86C 'call':118C 'checksql':38B,87C 'collect':3A,97C,104C 'collection-sql':2A,96C 'contain':72C 'cve':12A,15A 'danger':107C 'databas':56B 'execut':109C 'file':64B,67B,121C 'hash':58B,116C 'hold':94C 'host':23B 'inject':75C 'let':29B 'nocobas':1A,18B,68C 'nocobase/plugin-collection-sql':25B,69C 'packag':19B 'password':57B,115C 'pg':59B,65B,113C,119C 'plugin':5A,26B 'postgresql':20B 'privileg':6A,31B,79C 'queri':47B,105C 'read':55B,62B,66B,112C,120C 'reload':50B,111C 'replac':101C 'run':9A,48B 'self':22B 'self-host':21B 'server':63B 'setfield':43B,91C 'shadow':60B,114C 'snippet':99C 'sql':4A,11A,34B,74C,84C,98C 'sqlcollect':42B,90C 'statement':108C 'store':33B,46B,82C 'unvalid':83C 'user':7A,32B,80C 'valid':39B 'via':40B 'vulner':76C","nicknames":[],"mitigations":[],"who_affected":null,"tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-19T16:17:06+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-112306","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-112306","severity":null,"published_at":"2026-10-19T16:17:06+00:00","modified_at":"2026-10-19T17:17:15+00:00","first_seen_at":"2026-10-23T21:57:18+00:00","fetched_at":"2026-10-23T22:28:57+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}