CVE-2024-22836

9.8 CRITICAL

📋 TL;DR

This CVE describes an OS command injection vulnerability in Akaunting v3.1.3 and earlier that allows attackers to execute arbitrary system commands on the hosting server by manipulating the company locale during app installation. This affects all Akaunting installations running vulnerable versions, potentially giving attackers complete control over affected systems.

💻 Affected Systems

Products:
  • Akaunting
Versions: v3.1.3 and earlier
Operating Systems: All platforms running Akaunting
Default Config Vulnerable: ⚠️ Yes
Notes: All default installations are vulnerable. The vulnerability requires app installation access, which may be limited by user permissions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise allowing data theft, ransomware deployment, lateral movement to other systems, and complete system destruction.

🟠

Likely Case

Initial foothold leading to data exfiltration, cryptocurrency mining, or backdoor installation for persistent access.

🟢

If Mitigated

Limited impact if proper network segmentation, least privilege, and monitoring are in place, potentially containing to the web application container.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires access to app installation functionality. Public proof-of-concept exists in GitHub repository.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v3.1.4

Vendor Advisory: https://github.com/akaunting/akaunting/releases/tag/3.1.4

Restart Required: Yes

Instructions:

1. Backup your Akaunting database and files. 2. Download v3.1.4 from GitHub releases. 3. Replace existing installation files with new version. 4. Clear cache and restart web server. 5. Verify functionality.

🔧 Temporary Workarounds

Disable App Installation

all

Temporarily disable ability to install apps through Akaunting interface

# Modify Akaunting configuration or use .htaccess to restrict access to installation endpoints

Network Restriction

all

Restrict access to Akaunting installation/admin interfaces to trusted IPs only

# Example for Apache: Require ip 192.168.1.0/24
# Example for Nginx: allow 192.168.1.0/24; deny all;

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate Akaunting server from critical systems
  • Deploy web application firewall with command injection detection rules

🔍 How to Verify

Check if Vulnerable:

Check Akaunting version in admin panel or by examining version files. Versions 3.1.3 and earlier are vulnerable.

Check Version:

php artisan version

Verify Fix Applied:

Verify version is 3.1.4 or later in admin panel and test app installation functionality with malicious locale input.

📡 Detection & Monitoring

Log Indicators:

  • Unusual system commands in web server logs
  • Multiple failed app installation attempts
  • Suspicious locale parameters in POST requests

Network Indicators:

  • Outbound connections from web server to unusual destinations
  • Command and control traffic patterns

SIEM Query:

source="web_server" AND (url="*install*" OR url="*app*install*") AND (param="*locale*" OR param="*;*" OR param="*|*" OR param="*`*")

🔗 References

📤 Share & Export