CRE-2025-0178: n8n SQLite Data Loss Detection #138
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CRE-2025-0178: n8n SQLite Data Loss Detection
closes #128
/claim #128
🎯 Overview
This PR introduces a comprehensive detection rule for n8n SQLite data loss vulnerability - addressing critical workflow disappearance affecting n8n deployments globally. The rule identifies SQLite pool misconfiguration leading to complete workflow data loss requiring immediate intervention.
CRE Playground Links
CRE-2025-0178 Playground: Test Rule
📊 n8n Issues Covered
DB_SQLITE_POOL_SIZE=0
SQLite pool size is set to 0, using single connection mode
Workflow count mismatch: expected 5, found 0
All workflows appear to be missing
Database query returned empty result
Execution history table is empty
Critical data loss detected
48 hours of work has been lost
🧪 Testing & Validation
cat test.log | preq -r n8n-sqlite-data-loss.yaml -d
🎬 Demo Environment
Repo link: https://github.com/MAVRICK-1/n8n-reproduction-env
Features:
Screencast.from.2025-08-29.00-17-13.mp4
./scan-vulnerabilities.sh
)git clone https://github.com/MAVRICK-1/n8n-reproduction-env cd n8n-reproduction-env ./start.sh ./scan-vulnerabilities.sh
References