Security - Secure Profile
Pre-configured security hardening profiles for ColdFusion
Overview
ColdFusion Secure Profile is a comprehensive security hardening feature that applies multiple security settings simultaneously to lock down your server. Rather than manually configuring dozens of security options, Secure Profile provides pre-configured profiles optimized for different environments (production, development) and use cases.
Applying a Secure Profile modifies settings across multiple administrator sections including file access restrictions, disabled functions and tags, sandboxing, and more. This provides a quick way to implement security best practices and meet compliance requirements.
Available Secure Profiles
ColdFusion provides built-in profiles for common deployment scenarios.
Production Secure Profile (High Security)
• Robust exception information disabled
• Administrative API access restricted
• File/directory operations limited
• Potentially dangerous tags/functions disabled
• Sandbox security enabled
<cfexecute>- Prevent command execution<cfregistry>- Block Windows registry access<cfobject>type="java" - Restrict Java object creation- File upload to certain directories
- Access to ColdFusion administrator API
- Debug output and error details
- RDS (Remote Development Services)
Development Profile (Moderate Security)
• Debugging and error details available
• More permissive file operations
• Development tools accessible
• Less restrictive sandboxing
- Detailed error messages and stack traces
- Debug output enabled
- Less restrictive file system access
- Access to development/debugging tags
- Administrative API may be accessible
Custom Secure Profile
Applying a Secure Profile
Application Steps
Production Secure Profile Deployment Checklist
PRE-DEPLOYMENT:
□ Backup current configuration (neo-security.xml and other config files)
□ Document current security settings
□ Apply Production Secure Profile to staging/test environment
□ Run full application test suite
□ Test all critical user workflows
□ Verify file upload/download functionality
□ Test any admin or privileged operations
□ Review application logs for permission errors
□ Document any required exceptions/modifications
DEPLOYMENT:
□ Schedule during maintenance window
□ Notify stakeholders of deployment
□ Apply Production Secure Profile in administrator
□ Restart ColdFusion service (if required)
□ Verify profile applied successfully
□ Test critical application functions immediately
POST-DEPLOYMENT:
□ Monitor application logs for errors
□ Test core functionality
□ Verify no unexpected permission errors
□ Document applied profile and date
□ Update security documentation
□ Schedule regular security reviews
ROLLBACK PLAN:
□ Have configuration backup ready
□ Document rollback procedure
□ Test rollback in staging first
□ Keep previous config for quick restoreSecurity Settings Modified by Profiles
Detailed breakdown of settings changed when applying Production Secure Profile.
RDS Settings
- Production Profile
- RDS disabled completely
- Development Profile
- RDS optionally enabled
- Impact
- Prevents remote IDE access
Critical for production security - RDS provides extensive server access
Robust Exception
- Production Profile
- Disabled
- Development Profile
- Enabled
- Impact
- Hides error details from users
Prevents exposure of paths, SQL queries, and code structure
AJAX Debug Logging
- Production Profile
- Disabled
- Development Profile
- Enabled
- Impact
- Prevents debug info exposure
Stops debug information from being sent to client browsers
WebSocket Logging
- Production Profile
- Disabled
- Development Profile
- Enabled
- Impact
- Reduces log verbosity
Prevents excessive WebSocket logging in production
Admin API Security
- Production Profile
- Restricted or disabled
- Development Profile
- Available
- Impact
- Blocks programmatic admin access
Prevents applications from modifying server configuration
Sandbox Security
- Production Profile
- Enabled with restrictions
- Development Profile
- Less restrictive
- Impact
- Limits file/resource access
Creates security boundaries for application file system access
Disabled Tags and Functions
Tags and functions typically disabled by Production Secure Profile.
High-Risk Tags
<cfexecute>- Execute system commands
Risk: Remote code execution, command injection<cfregistry>- Access Windows registry
Risk: System configuration changes, privilege escalation<cfobject type="java">- Create Java objects
Risk: Unrestricted Java class access, security bypass<cfobject type="com">- Create COM objects
Risk: Windows system manipulation, security bypass
Restricted File Operations
- File uploads to system directories blocked
Protected: /CFIDE, /WEB-INF, system paths - Read/write access to sensitive directories restricted
Protected: Configuration directories, admin areas - Directory browsing/listing may be restricted
Prevents reconnaissance and file discovery
/**
* Test if specific tags/functions are disabled by Secure Profile
* Use this to verify production security settings
*/
// Test cfexecute
try {
cfexecute(name="whoami", variable="result", timeout=1);
writeOutput("⚠️ WARNING: cfexecute is ENABLED<br>");
} catch (any e) {
writeOutput("✓ cfexecute is disabled (expected)<br>");
}
// Test cfregistry (Windows only)
try {
cfregistry(action="list", branch="HKEY_LOCAL_MACHINE", name="regTest");
writeOutput("⚠️ WARNING: cfregistry is ENABLED<br>");
} catch (any e) {
writeOutput("✓ cfregistry is disabled (expected)<br>");
}
// Test Java object creation
try {
javaObj = createObject("java", "java.lang.System");
writeOutput("⚠️ WARNING: Java object creation is ENABLED<br>");
} catch (any e) {
writeOutput("✓ Java object creation is restricted (expected)<br>");
}
// Test Admin API access
try {
adminAPI = createObject("component", "cfide.adminapi.administrator");
writeOutput("⚠️ WARNING: Admin API is accessible<br>");
} catch (any e) {
writeOutput("✓ Admin API is restricted (expected)<br>");
}
writeOutput("<br><strong>Note:</strong> All restricted items should show as disabled in production.");Custom Security Configurations
Selective Exception Enabling
2. Document the specific feature needed
3. Enable only that specific feature
4. Use Sandbox Security to limit scope
5. Document exception and business justification
- PDF Generation: May require Java object access - enable for specific sandbox only
- Report Generation: May need cfexecute for external tools - restrict to specific directory
- System Integration: May need COM objects - limit to specific application
SECURITY EXCEPTION DOCUMENTATION
Exception ID: SEC-EXC-001
Date Requested: 2025-10-27
Requested By: Development Team
SECURE PROFILE EXCEPTION REQUEST
=================================
Affected Setting:
cfexecute tag - Currently disabled by Production Secure Profile
Business Justification:
Report generation system requires cfexecute to call external
PDF processing tool (wkhtmltopdf) for invoice generation.
Approximately 10,000 invoices generated monthly.
No viable alternative found.
Security Impact Assessment:
RISK LEVEL: Medium-High
- Command injection possible if user input not sanitized
- Limited to specific directory via sandbox
- Only specific executable allowed
Mitigation Measures:
✓ Sandbox security restricts cfexecute to /reports directory only
✓ Only whitelisted executable allowed: /usr/local/bin/wkhtmltopdf
✓ All user input validated/sanitized before execution
✓ Command arguments built using parameterization
✓ Execution logging enabled
✓ Monitoring alerts for unusual execution patterns
Implementation:
1. Enable cfexecute in Administrator
2. Configure sandbox for /reports directory
3. Whitelist only required executable
4. Enable audit logging
5. Deploy monitoring alerts
Approved By: Security Team (Jane Doe)
Date Approved: 2025-10-27
Review Date: 2026-01-27 (quarterly review)
QUARTERLY REVIEW CHECKLIST:
□ Is this exception still required?
□ Have alternative solutions become available?
□ Have there been any security incidents?
□ Are mitigation measures still effective?
□ Update review date for next quarterCommon Issues & Solutions
Application Breaks After Applying Profile
- Review ColdFusion exception logs for permission/security errors
- Identify which tags/functions are being blocked
- Test in staging environment before production
- Create sandbox exceptions for required functionality
- Enable specific features if business-critical (with security review)
- Refactor code to use safer alternatives where possible
- Document all exceptions and mitigation measures
File Upload Failures
- Verify upload directory is outside restricted paths
- Never upload to /CFIDE, /WEB-INF, or system directories
- Configure sandbox security to allow uploads to specific directory
- Ensure upload directory has proper OS permissions
- Use dedicated uploads directory outside web root when possible
- Implement file type validation and virus scanning
Cannot Access Admin API
- Production Secure Profile restricts Admin API access (by design)
- Evaluate if Admin API is truly necessary in production
- Move admin tasks to separate maintenance scripts
- Use scheduler for admin tasks instead of real-time API calls
- If required, enable Admin API with sandbox restrictions
- Limit Admin API access to specific IP addresses only
- Implement additional authentication for Admin API operations
Compliance and Security Frameworks
- PCI-DSS: Requirement 2.2 - Develop configuration standards for all system components
- PCI-DSS: Requirement 6.5 - Address common coding vulnerabilities
- OWASP Top 10: Mitigates several categories including A05:2021 Security Misconfiguration
- NIST Cybersecurity Framework: PR.AC-3 Remote access is managed
- ISO 27001: A.12.6.1 Management of technical vulnerabilities
- SOC 2: CC6.6 Logical and physical access controls
- CIS Benchmarks: Application server hardening guidelines