CVE-2024-29904
📋 TL;DR
A denial-of-service vulnerability in CodeIgniter's Language class allows attackers to trigger excessive memory consumption on servers. This affects all CodeIgniter4 applications using the vulnerable Language class functionality. Attackers can exploit this to crash or degrade server performance.
💻 Affected Systems
- CodeIgniter4
📦 What is this software?
Codeigniter by Codeigniter
⚠️ Risk & Real-World Impact
Worst Case
Server becomes unresponsive due to memory exhaustion, causing complete service outage and requiring server restart.
Likely Case
Degraded application performance, increased memory usage, and potential service disruption for legitimate users.
If Mitigated
Minimal impact with proper memory limits and monitoring in place, but still vulnerable to targeted attacks.
🎯 Exploit Status
The vulnerability is in core framework functionality and requires minimal technical skill to exploit.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 4.4.7 or later
Vendor Advisory: https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-39fp-mqmm-gxj6
Restart Required: No
Instructions:
1. Update CodeIgniter4 to version 4.4.7 or later via Composer: composer require codeigniter4/framework:^4.4.7
2. Verify the update completed successfully
3. Test application functionality
🔧 Temporary Workarounds
Implement PHP memory limits
allSet strict memory limits in PHP configuration to prevent complete server exhaustion
php.ini: memory_limit = 128M
Rate limiting
allImplement request rate limiting to prevent repeated exploitation attempts
🧯 If You Can't Patch
- Implement web application firewall (WAF) rules to detect and block suspicious Language class usage patterns
- Increase server monitoring for abnormal memory consumption and implement automatic alerting
🔍 How to Verify
Check if Vulnerable:
Check CodeIgniter version in composer.json or via phpinfo() if framework version is exposed
Check Version:
composer show codeigniter4/framework | grep versions
Verify Fix Applied:
Verify CodeIgniter version is 4.4.7 or higher: composer show codeigniter4/framework
📡 Detection & Monitoring
Log Indicators:
- Unusually high memory usage spikes
- Multiple rapid requests to language-related endpoints
- PHP memory limit errors in logs
Network Indicators:
- High volume of requests to language/translation endpoints
- Abnormal request patterns targeting Language class functionality
SIEM Query:
source="php_error.log" AND ("Allowed memory size" OR "memory_limit") AND process="php-fpm"
🔗 References
- https://github.com/codeigniter4/CodeIgniter4/commit/fa851acbae7ae4c5a97f8f38ae87aa0822a334c0
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-39fp-mqmm-gxj6
- https://github.com/codeigniter4/CodeIgniter4/commit/fa851acbae7ae4c5a97f8f38ae87aa0822a334c0
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-39fp-mqmm-gxj6