{"id":"GHSA-4v22-g448-h4rg","kind":"vulnerability","aliases":["GHSA-4v22-g448-h4rg"],"related":[],"title":"MongoDB Node Update Operations Can Modify Unintended Documents","description":"## Impact\n\nIn the MongoDB node's Update and Find And Replace operations, the update key value taken from the incoming item was not sufficiently validated. Where a workflow passes untrusted input, such as a webhook body, to one of these operations, a caller could make the node match and overwrite documents other than the one the workflow intended, or insert new documents.\n\n## Patches\n\nThe issue has been fixed in n8n versions 1.123.89, 2.45.5, 2.46.1 and 3.0.1. Users should upgrade to one of these versions or later to remediate the vulnerability.\n\n## Workarounds\n\nIf upgrading is not immediately possible, administrators should consider the following temporary mitigations:\n- Restrict n8n instance access to fully trusted users only.\n- Audit active workflows that use the MongoDB node with Find And Replace or Update operations and ensure the `updateKey` value cannot be influenced by untrusted external data.\n- Apply network-level controls to restrict access to webhook endpoints that feed into MongoDB update workflows.\n- Disable the MongoDB node by adding `n8n-nodes-base.mongoDb` to the `NODES_EXCLUDE` environment variable if it is not required.\n- Deactivate affected workflows until the instance is patched.\n\nThese workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.","summary":"The MongoDB node in n8n did not validate the update key taken from incoming workflow data. A caller who controls that input, for example through a webhook, can make an Update or Find And Replace match and overwrite other documents or insert new ones.","severity":"medium","cvss":5.3,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"n8n","fixed":[">= 1.123.89"],"affected":"< 1.123.89","ecosystem":"npm"},{"name":"n8n","fixed":[">= 2.46.1"],"affected":"< 2.46.1","ecosystem":"npm"},{"name":"n8n","fixed":[">= 2.45.5"],"affected":"< 2.45.5","ecosystem":"npm"},{"name":"n8n","fixed":[">= 3.0.1"],"affected":"< 3.0.1","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["mongodb","n8n","package","self-hosted","webhooks"],"not_affected_if":["hardcoded-update-key","managed-hosting","no-mongodb-node","read-only-workflows"],"how_to_check":"- Run `npm ls n8n` or check the n8n version in the running instance\n- Find workflows that use the MongoDB node with Update or Find And Replace and confirm whether `updateKey` can be set from a webhook body or other untrusted input\n- Check whether `NODES_EXCLUDE` includes `n8n-nodes-base.mongoDb`","fix":"- n8n `1.123.89`\n- n8n `2.45.5`\n- n8n `2.46.1`\n- n8n `3.0.1`","status":"open","published_at":"2026-10-28T08:48:23+00:00","first_seen_at":"2026-11-09T22:53:25+00:00","triaged_at":"2026-11-09T22:56:40+00:00","updated_at":"2026-11-09T22:56:40+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-09T22:56:40Z","model":"claude-haiku-5-5","output":{"fix":"- n8n `1.123.89`\n- n8n `2.45.5`\n- n8n `2.46.1`\n- n8n `3.0.1`","reach":"internet","title":"n8n: MongoDB node update keys can overwrite unintended documents","impact":"medium","summary":"The MongoDB node in n8n did not validate the update key taken from incoming workflow data. A caller who controls that input, for example through a webhook, can make an Update or Find And Replace match and overwrite other documents or insert new ones.","audience":"businesses","category":"package","nicknames":[],"who_cares":["n8n","mongodb","self-hosted","webhooks"],"confidence":0.8,"fix_status":"available","needs_auth":"unknown","worst_case":"Attacker overwrites or inserts documents in the MongoDB database","analyst_note":"","how_to_check":"- Run `npm ls n8n` or check the n8n version in the running instance\n- Find workflows that use the MongoDB node with Update or Find And Replace and confirm whether `updateKey` can be set from a webhook body or other untrusted input\n- Check whether `NODES_EXCLUDE` includes `n8n-nodes-base.mongoDb`","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["no-mongodb-node","read-only-workflows","hardcoded-update-key","managed-hosting"],"who_is_affected":"Exposure requires a workflow that runs the MongoDB node's Update or Find And Replace operation and takes its updateKey value from untrusted input such as a webhook body. Workflows that only read from MongoDB, or that hard-code the update key, are not exposed by this flaw. Teams running n8n with only trusted users and no untrusted input feeding those operations have lower practical risk.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.000836,"input_tokens":5041,"output_tokens":664,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'1.123.89':145C '2.45.5':146C '2.46.1':147C '3.0.1':149C '4v22':11A,16A 'access':181C,221C 'activ':188C 'add':236C 'administr':171C 'affect':250C 'appli':214C 'audit':187C 'bodi':109C 'caller':47B,116C 'cannot':207C 'consid':173C 'control':49B,218C 'could':117C 'data':45B,213C 'deactiv':249C 'disabl':231C 'document':8A,69B,124C,135C 'endpoint':224C 'ensur':203C 'environ':242C 'exampl':53B 'exclud':241C 'extern':212C 'feed':226C 'find':62B,82C,196C 'fix':141C 'follow':175C 'fulli':183C,261C 'g448':12A,17A 'ghsa':10A,15A 'ghsa-4v22-g448-h4rg':9A,14A 'h4rg':13A,18A 'host':28B 'immedi':169C 'impact':74C 'incom':43B,93C 'influenc':209C 'input':51B,104C 'insert':71B,133C 'instanc':180C,254C 'intend':131C 'issu':138C 'item':94C 'key':40B,88C 'later':159C 'level':217C 'make':58B,118C 'match':65B,121C 'measur':275C 'mitig':177C,274C 'modifi':6A 'mongodb':1A,23B,31B,77C,193C,228C,233C 'n8n':19A,20A,21A,22A,24B,34B,143C,179C 'n8n-nodes-base.mongodb':237C 'network':216C 'network-level':215C 'new':72B,134C 'node':2A,32B,78C,120C,194C,234C,240C 'one':73B,111C,128C,154C 'oper':4A,85C,114C,201C 'overwrit':67B,123C 'packag':25B 'pass':102C 'patch':136C,256C 'possibl':170C 'remedi':161C,262C 'replac':64B,84C,198C 'requir':248C 'restrict':178C,220C 'risk':264C 'self':27B 'self-host':26B 'short':272C 'short-term':271C 'suffici':97C 'taken':41B,90C 'temporari':176C 'term':273C 'trust':184C 'unintend':7A 'untrust':103C,211C 'updat':3A,39B,60B,80C,87C,200C,229C 'updatekey':205C 'upgrad':152C,166C 'use':191C,269C 'user':150C,185C 'valid':37B,98C 'valu':89C,206C 'variabl':243C 'version':144C,157C 'vulner':163C 'webhook':29B,56B,108C,223C 'workaround':164C,258C 'workflow':44B,101C,130C,189C,230C,251C","nicknames":[],"mitigations":[],"who_affected":"Exposure requires a workflow that runs the MongoDB node's Update or Find And Replace operation and takes its updateKey value from untrusted input such as a webhook body. Workflows that only read from MongoDB, or that hard-code the update key, are not exposed by this flaw. Teams running n8n with only trusted users and no untrusted input feeding those operations have lower practical risk.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":["n8n"],"ptokens":["n8n"],"labels":["medium","mongodb","n8n","npm","package","selfhosted","webhooks"],"campaign_type":null,"search_a":"'4v22':11A,16A 'document':8A 'g448':12A,17A 'ghsa':10A,15A 'ghsa-4v22-g448-h4rg':9A,14A 'h4rg':13A,18A 'modifi':6A 'mongodb':1A 'n8n':19A,20A,21A,22A 'node':2A 'oper':4A 'unintend':7A 'updat':3A","search_b":"'caller':47B 'control':49B 'data':45B 'document':69B 'exampl':53B 'find':62B 'host':28B 'incom':43B 'input':51B 'insert':71B 'key':40B 'make':58B 'match':65B 'mongodb':23B,31B 'n8n':24B,34B 'new':72B 'node':32B 'one':73B 'overwrit':67B 'packag':25B 'replac':64B 'self':27B 'self-host':26B 'taken':41B 'updat':39B,60B 'valid':37B 'webhook':29B,56B 'workflow':44B","search_c":"'1.123.89':145C '2.45.5':146C '2.46.1':147C '3.0.1':149C 'access':181C,221C 'activ':188C 'add':236C 'administr':171C 'affect':250C 'appli':214C 'audit':187C 'bodi':109C 'caller':116C 'cannot':207C 'consid':173C 'control':218C 'could':117C 'data':213C 'deactiv':249C 'disabl':231C 'document':124C,135C 'endpoint':224C 'ensur':203C 'environ':242C 'exclud':241C 'extern':212C 'feed':226C 'find':82C,196C 'fix':141C 'follow':175C 'fulli':183C,261C 'immedi':169C 'impact':74C 'incom':93C 'influenc':209C 'input':104C 'insert':133C 'instanc':180C,254C 'intend':131C 'issu':138C 'item':94C 'key':88C 'later':159C 'level':217C 'make':118C 'match':121C 'measur':275C 'mitig':177C,274C 'mongodb':77C,193C,228C,233C 'n8n':143C,179C 'n8n-nodes-base.mongodb':237C 'network':216C 'network-level':215C 'new':134C 'node':78C,120C,194C,234C,240C 'one':111C,128C,154C 'oper':85C,114C,201C 'overwrit':123C 'pass':102C 'patch':136C,256C 'possibl':170C 'remedi':161C,262C 'replac':84C,198C 'requir':248C 'restrict':178C,220C 'risk':264C 'short':272C 'short-term':271C 'suffici':97C 'taken':90C 'temporari':176C 'term':273C 'trust':184C 'untrust':103C,211C 'updat':80C,87C,200C,229C 'updatekey':205C 'upgrad':152C,166C 'use':191C,269C 'user':150C,185C 'valid':98C 'valu':89C,206C 'variabl':243C 'version':144C,157C 'vulner':163C 'webhook':108C,223C 'workaround':164C,258C 'workflow':101C,130C,189C,230C,251C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-10-28T08:48:23+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"ghsa-repo","external_id":"GHSA-4v22-g448-h4rg","url":"https://github.com/n8n-io/n8n/security/advisories/GHSA-4v22-g448-h4rg","severity":"medium","published_at":"2026-10-28T08:48:23+00:00","modified_at":"2026-10-28T08:48:23+00:00","first_seen_at":"2026-11-09T22:53:25+00:00","fetched_at":"2026-11-09T22:53:25+00:00","note":null}],"documents":[{"id":110632,"url":"https://github.com/n8n-io/n8n/security/advisories/GHSA-4v22-g448-h4rg","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa-repo","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}