|
| 1 | +rules: |
| 2 | +- cre: |
| 3 | + id: CRE-2025-0179 |
| 4 | + severity: 0 |
| 5 | + title: N8N Workflow Silent Data Loss During Execution |
| 6 | + category: workflow-automation-problem |
| 7 | + author: Claude Code Assistant |
| 8 | + description: | |
| 9 | + N8N workflow automation platform experiences critical silent data loss where items |
| 10 | + disappear between workflow nodes without generating error messages. This high-severity |
| 11 | + issue affects long-running workflows (60-115+ minutes) and can cause workflows to |
| 12 | + randomly cancel mid-execution, leading to incomplete processing and data integrity |
| 13 | + problems. Items silently vanish between nodes, with different item counts across |
| 14 | + the workflow pipeline, making the issue particularly dangerous for production systems |
| 15 | + that rely on complete data processing. |
| 16 | + cause: | |
| 17 | + * Workflow execution engine fails to properly track items between nodes in long-running workflows |
| 18 | + * Memory management issues during extended workflow processing causing item references to be lost |
| 19 | + * Race conditions in the worker queue system when handling multiple concurrent items |
| 20 | + * Node-to-node data transfer mechanisms failing silently under certain load conditions |
| 21 | + * Queue worker timeout or resource contention causing partial item processing without error reporting |
| 22 | + * Database transaction issues where some items fail to persist between workflow stages |
| 23 | + tags: |
| 24 | + - n8n |
| 25 | + - workflow-automation |
| 26 | + - data-loss |
| 27 | + - silent-failure |
| 28 | + - production-critical |
| 29 | + - data-integrity |
| 30 | + - public |
| 31 | + mitigation: | |
| 32 | + - **Implement workflow item counting checks** - Add validation nodes between critical |
| 33 | + processing steps to verify item counts match expected values |
| 34 | + - **Enable comprehensive execution logging** - Set N8N_LOG_LEVEL to debug and |
| 35 | + EXECUTIONS_DATA_SAVE_ON_SUCCESS to 'all' to capture detailed execution data |
| 36 | + - **Add workflow timeout monitoring** - Monitor executions that cancel around 21-23 |
| 37 | + minute mark and implement retry mechanisms for failed workflows |
| 38 | + - **Implement data integrity validation** - Add checksum or validation steps at |
| 39 | + workflow start/end to detect silent data loss |
| 40 | + - **Use error handling workflows** - Configure error workflows to capture and log |
| 41 | + execution failures, even when main workflow fails silently |
| 42 | + - **Monitor execution metrics** - Set up alerting on workflow completion rates and |
| 43 | + item processing inconsistencies |
| 44 | + - **Consider workflow segmentation** - Break long workflows into smaller, more |
| 45 | + manageable chunks to reduce exposure to the data loss issue |
| 46 | + references: |
| 47 | + - https://github.com/n8n-io/n8n/issues/14909 |
| 48 | + - https://docs.n8n.io/flow-logic/error-handling/ |
| 49 | + - https://community.n8n.io/t/workflow-randomly-cancels-mid-execution-without-error-data-items-silently-dropped-between-nodes/51141 |
| 50 | + applications: |
| 51 | + - name: n8n |
| 52 | + version: ">= 1.90.0" |
| 53 | + processName: n8n |
| 54 | + containerName: n8n |
| 55 | + impact: | |
| 56 | + Silent data loss in workflow automation can cause critical business processes to fail |
| 57 | + without detection, leading to incomplete data processing, missing business transactions, |
| 58 | + failed integrations, and potential compliance violations. The silent nature makes it |
| 59 | + extremely difficult to detect and troubleshoot, potentially causing weeks or months |
| 60 | + of data integrity issues before discovery. |
| 61 | + impactScore: 9 |
| 62 | + mitigationScore: 7 |
| 63 | + metadata: |
| 64 | + kind: prequel |
| 65 | + id: N8nSilentDataLossDetection919 |
| 66 | + gen: 1 |
| 67 | + rule: |
| 68 | + sequence: |
| 69 | + window: 120s |
| 70 | + event: |
| 71 | + source: cre.log.n8n |
| 72 | + order: |
| 73 | + - regex: "(cancelled mid-execution|execution terminated unexpectedly|workflow.*cancelled|Execution.*cancelled)" |
| 74 | + - regex: "(silent data loss detected|data.*loss|itemsLost|dataIntegrityIssue.*true|Items processed inconsistently|Data integrity check failed|Expected [0-9]+ items, found [0-9]+ items)" |
0 commit comments