v1.4.1 release notes
[!IMPORTANT] Superseded in part, 2026-08-30. This document is kept as the historical record of the work it describes; everything below this notice is unchanged. But the
SafeRegex.mjsmitigation it reports as in place is no longer in the code: a later run ofupstream-sync.ymloverwrote the operations that imported it, and the module has since been removed. Do not read this file as a statement of current security posture. See the incident record.
Release Date: December 14, 2025 Release Type: Security Patch Repository: doublegate/CyberChef-MCP
Overview
Section titled “Overview”Version 1.4.1 is a critical security patch release addressing 11 of 12 Code Scanning vulnerabilities identified in the codebase. This release includes fixes for one critical cryptographic randomness vulnerability, seven high-severity Regular Expression Denial of Service (ReDoS) vulnerabilities, and introduces a new centralized security module for regex validation.
All users are strongly encouraged to upgrade immediately.
Security Fixes
Section titled “Security Fixes”Critical Severity
Section titled “Critical Severity”1. Insecure Cryptographic Randomness (CWE-330)
Section titled “1. Insecure Cryptographic Randomness (CWE-330)”File: src/core/vendor/gost/gostRandom.mjs
Issue: The GOST cryptographic operations used Math.random() as a fallback for random number generation, which is not cryptographically secure and produces predictable values.
Fix:
- Replaced
Math.random()fallback with Node.jscrypto.randomBytes()for secure random number generation - Added explicit error handling that throws when no secure RNG is available
- Prevents predictable cryptographic key generation in GOST cipher operations
Impact: Without this fix, cryptographic operations could generate predictable keys, compromising security.
High Severity
Section titled “High Severity”2-8. Regular Expression Denial of Service - ReDoS (CWE-1333)
Section titled “2-8. Regular Expression Denial of Service - ReDoS (CWE-1333)”Seven instances of potential ReDoS vulnerabilities were identified and fixed across six operations:
Affected Operations:
- RAKE.mjs (lines 58-59) - 2 instances in keyword extraction
- Filter.mjs (line 59) - User-controlled regex filtering
- FindReplace.mjs (line 79) - Search and replace operations
- Register.mjs (line 70) - Register extraction patterns
- Subsection.mjs (line 98) - Text subsection matching
- RegularExpression.mjs (line 158) - General regex operations
Fix: New SafeRegex.mjs security module with comprehensive validation:
- Pattern length limits (10,000 characters maximum)
- Nested quantifier detection (e.g.,
(a+)+,(a*)*) - Timeout-based catastrophic backtracking detection (100ms threshold)
- XRegExp flag compatibility filtering
- Detailed error reporting with SafeRegexError class
Impact: Without these fixes, malicious regex patterns could cause the server to hang or crash through catastrophic backtracking.
Low Severity (Documented, No Fix Required)
Section titled “Low Severity (Documented, No Fix Required)”Three instances of Math.random() were identified in non-cryptographic contexts and documented as acceptable:
- Numberwang.mjs - Random trivia fact selection
- RandomizeColourPalette.mjs - Color palette seed generation
- LoremIpsum.mjs - Placeholder text variation
These do not pose security risks as they are not used in security-critical contexts.
Documented (Out of Scope for MCP Server)
Section titled “Documented (Out of Scope for MCP Server)”File: src/web/OutputWaiter.mjs - Code injection vulnerability
This vulnerability exists in the web UI code only and does not affect the MCP server, which does not use the web interface components.
New Security Module
Section titled “New Security Module”SafeRegex.mjs
Section titled “SafeRegex.mjs”Location: src/core/lib/SafeRegex.mjs
A new centralized security module for validating and creating safe regular expressions:
Features:
-
validatePattern(pattern, flags): Comprehensive pattern safety analysis- Length validation (10,000 char max)
- Nested quantifier detection
- Timeout-based backtracking detection
- Returns validation result object with details
-
createSafeRegex(pattern, flags): Validated RegExp creation- Creates standard RegExp objects with validation
- Throws SafeRegexError on unsafe patterns
- Automatic XRegExp flag filtering
-
isSafePattern(pattern, flags): Quick boolean safety check- Simple true/false validation
- Useful for conditional logic
-
SafeRegexError: Custom error class- Detailed diagnostic information
- Includes pattern, reason, and suggestions
Pattern Validation Rules:
- Maximum pattern length: 10,000 characters
- Nested quantifiers disallowed:
(a+)+,(a*)*,(a+)*,(a*)+,(a{n,m})* - Backtracking timeout: 100ms on test string
- XRegExp flag compatibility: Filters non-standard flags for RegExp creation
Usage Example:
import { createSafeRegex } from "../lib/SafeRegex.mjs";
// Throws SafeRegexError if pattern is unsafeconst regex = createSafeRegex(userPattern, "gi");const results = input.match(regex);Code Quality Fixes
Section titled “Code Quality Fixes”ESLint Compliance
Section titled “ESLint Compliance”File: src/core/lib/SafeRegex.mjs (line 68)
Fixed ESLint quotes rule violation:
- Changed:
flags.replace(/[^gimsuvy]/g, ''); - To:
flags.replace(/[^gimsuvy]/g, "");
This ensures consistent use of double quotes throughout the codebase per project style guidelines.
Files Changed
Section titled “Files Changed”Modified Files (10)
Section titled “Modified Files (10)”Security Fixes:
src/core/vendor/gost/gostRandom.mjs- Cryptographic randomness fixsrc/core/operations/RAKE.mjs- ReDoS fixes (2 instances)src/core/operations/Filter.mjs- ReDoS fixsrc/core/operations/FindReplace.mjs- ReDoS fixsrc/core/operations/Register.mjs- ReDoS fixsrc/core/operations/Subsection.mjs- ReDoS fixsrc/core/operations/RegularExpression.mjs- ReDoS fix
New Module:
8. src/core/lib/SafeRegex.mjs - New security module (ESLint fix applied)
Documentation:
9. README.md - Updated security section, latest release reference
10. CHANGELOG.md - Added [1.4.1] release section
Reports:
11. SECURITY_FIX_REPORT.md - Detailed technical analysis of all fixes
12. SECURITY_FIXES_SUMMARY.md - Quick reference guide
Release Documentation:
13. docs/releases/v1.4.1.md - This file
Version Updates:
14. package.json - mcpVersion: 1.4.0 → 1.4.1
15. src/node/mcp-server.mjs - VERSION constant: 1.4.0 → 1.4.1
Upgrade Instructions
Section titled “Upgrade Instructions”Docker (Recommended)
Section titled “Docker (Recommended)”Pull the latest image from GitHub Container Registry:
docker pull ghcr.io/doublegate/cyberchef-mcp_v1:latestOr use the specific version tag:
docker pull ghcr.io/doublegate/cyberchef-mcp_v1:v1.4.1Update your MCP client configuration to use the new image version.
Local Node.js Installation
Section titled “Local Node.js Installation”# Update to latest codegit pull origin mastergit checkout v1.4.1
# Reinstall dependencies (if needed)npm install
# Regenerate configuration (required)npx grunt configTests
# Restart MCP servernpm run mcpCompatibility
Section titled “Compatibility”Breaking Changes
Section titled “Breaking Changes”None. This is a fully backward-compatible security patch.
Requirements
Section titled “Requirements”- Node.js: v22+
- Docker: 20.10+ (if using containers)
- MCP Client: Any MCP-compatible client
Tested Configurations
Section titled “Tested Configurations”- Claude Desktop (MCP client)
- Docker on Linux (Alpine 3.20)
- Node.js 22.12.0
- npm 10.9.2
Testing & Validation
Section titled “Testing & Validation”Test Results
Section titled “Test Results”Unit Tests: ✅ All passing
- 1,716 operation tests
- 217 Node API tests
- Total: 1,933 tests
Linting: ✅ Pass
- ESLint: 0 errors, 0 warnings
- All code style rules enforced
Manual Validation:
- Known ReDoS patterns properly rejected by SafeRegex module
- Cryptographic operations verified using secure RNG
- All 7 fixed operations tested with various regex patterns
- Performance benchmarks show no regression
Regression Testing
Section titled “Regression Testing”All existing functionality verified:
- ✅ 463 MCP tools registered successfully
- ✅
cyberchef_bakemeta-tool operational - ✅
cyberchef_searchdiscovery tool functional - ✅ Atomic operations (Base64, AES, SHA, etc.) working
- ✅ Performance optimizations (v1.4.0 features) intact
- LRU cache operational
- Streaming for large inputs working
- Resource limits enforced
- Memory monitoring active
Security Posture
Section titled “Security Posture”Vulnerabilities Resolved
Section titled “Vulnerabilities Resolved”- Total identified: 12
- Fixed in this release: 11
- Documented (out of scope): 1 (Web UI only)
- Remaining critical/high: 0
Current Status
Section titled “Current Status”- ✅ All cryptographic operations use secure RNG
- ✅ All user-controlled regex patterns validated
- ✅ ReDoS attack vectors eliminated
- ✅ Comprehensive security module in place
- ✅ Non-cryptographic Math.random() usage documented
Future Improvements
Section titled “Future Improvements”- Consider additional regex complexity limits
- Evaluate pattern allowlisting for high-security deployments
- Monitor upstream CyberChef for new security advisories
Known Issues
Section titled “Known Issues”None at this time.
Performance Impact
Section titled “Performance Impact”Benchmarks
Section titled “Benchmarks”Performance testing shows minimal overhead from security enhancements:
Regex Operations:
- SafeRegex validation adds <1ms per operation
- No impact on cached operations
- Timeout protection prevents infinite loops
Cryptographic Operations:
crypto.randomBytes()is faster thanMath.random()for secure RNG- No measurable performance degradation
Overall:
- All v1.4.0 performance optimizations retained
- Cache hit rates unaffected
- Memory footprint unchanged
Documentation Updates
Section titled “Documentation Updates”Updated Documentation
Section titled “Updated Documentation”- README.md - Security highlights, latest release version
- CHANGELOG.md - Full v1.4.1 changelog entry
- SECURITY_FIX_REPORT.md - Detailed technical analysis
- SECURITY_FIXES_SUMMARY.md - Quick reference
New Documentation
Section titled “New Documentation”- docs/releases/v1.4.1.md - This release notes file
Related Documentation
Section titled “Related Documentation”- SECURITY.md - Security policy and reporting process
- Performance Tuning Guide - v1.4.0 features
- User Guide - Installation and configuration
Contributors
Section titled “Contributors”This release was developed with assistance from:
- Claude Opus 4.5 (via Claude Code) - Security analysis, implementation, testing
Special thanks to GitHub Code Scanning for identifying these vulnerabilities.
Release Links
Section titled “Release Links”- Repository: doublegate/CyberChef-MCP
- Release Tag: v1.4.1
- Docker Images: ghcr.io/doublegate/cyberchef-mcp_v1
- Issue Tracker: GitHub Issues
- Security Policy: SECURITY.md
Support
Section titled “Support”For questions, issues, or security concerns:
- Issues: GitHub Issues
- Security: See SECURITY.md for responsible disclosure
- Discussions: GitHub Discussions
Previous Release: v1.4.0 - Performance Optimization Next Release: TBD
Full Changelog: CHANGELOG.md