CVE-2024-41344

7.5 HIGH

📋 TL;DR

This CSRF vulnerability in CodeIgniter 3.1.13 allows attackers to trick authenticated administrators into unknowingly changing their own passwords. Attackers can then take over administrator accounts and escalate privileges. Only CodeIgniter 3.1.13 applications with administrator interfaces are affected.

💻 Affected Systems

Products:
  • CodeIgniter
Versions: 3.1.13
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using CodeIgniter's built-in authentication/administrator functionality. Custom implementations may vary.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise where attackers gain administrator access, modify all data, install backdoors, and potentially pivot to other systems.

🟠

Likely Case

Administrator account takeover leading to data manipulation, privilege escalation, and unauthorized configuration changes.

🟢

If Mitigated

Attack fails due to CSRF tokens or other protections, with no impact on system security.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires tricking an authenticated administrator to visit a malicious page. The GitHub issue shows proof of concept.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: CodeIgniter 3.1.14 or later

Vendor Advisory: https://github.com/bcit-ci/CodeIgniter/releases

Restart Required: No

Instructions:

1. Backup your application. 2. Update CodeIgniter to version 3.1.14 or later. 3. Replace the system/core/Security.php file with the patched version. 4. Test administrator password change functionality.

🔧 Temporary Workarounds

Add CSRF Protection to Password Change Form

all

Manually add CSRF tokens to administrator password change forms if you cannot update immediately.

Add <?php echo csrf_field(); ?> to password change form in your view files

Implement Additional Authentication for Sensitive Actions

all

Require re-authentication (current password) before allowing password changes.

Modify controller to verify current password before processing password change

🧯 If You Can't Patch

  • Implement network segmentation to restrict access to administrator interfaces
  • Use web application firewalls (WAF) with CSRF protection rules

🔍 How to Verify

Check if Vulnerable:

Check if your application uses CodeIgniter 3.1.13 by examining the system/core/CodeIgniter.php file version constant.

Check Version:

grep "define('CI_VERSION'," system/core/CodeIgniter.php

Verify Fix Applied:

After updating, verify the version shows 3.1.14 or later and test that password change forms include CSRF tokens.

📡 Detection & Monitoring

Log Indicators:

  • Multiple administrator password change attempts from same IP
  • Password changes without corresponding login events

Network Indicators:

  • POST requests to password change endpoints without Referer headers or CSRF tokens

SIEM Query:

source="web_logs" AND (uri_path="/admin/change_password" OR uri_path="/admin/update_password") AND NOT csrf_token=*

🔗 References

📤 Share & Export