CVE-2023-46865

7.2 HIGH

📋 TL;DR

This vulnerability allows authenticated superadmin users in Crater invoice software to execute arbitrary PHP code by embedding malicious code within PNG image files uploaded as company logos. It affects Crater installations through version 6.0.6. The attack requires superadmin privileges but leads to full server compromise.

💻 Affected Systems

Products:
  • Crater Invoice
Versions: through 6.0.6
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires superadmin access to the /api/v1/company/upload-logo endpoint. Default installations with superadmin accounts are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server takeover with attacker gaining full control over the web server, accessing sensitive data, and potentially pivoting to other systems.

🟠

Likely Case

Superadmin account compromise leading to data theft, invoice manipulation, and installation of backdoors.

🟢

If Mitigated

Limited impact if proper access controls restrict superadmin accounts and file upload validation is enforced.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploit requires authenticated superadmin access. Public proof-of-concept code is available showing how to embed PHP code in PNG IDAT chunks.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 6.0.7 and later

Vendor Advisory: https://github.com/crater-invoice/crater/pull/1271

Restart Required: No

Instructions:

1. Update Crater to version 6.0.7 or later. 2. Apply the patch from GitHub pull request #1271 if updating is not possible. 3. Verify the fix by checking that uploaded images are properly validated.

🔧 Temporary Workarounds

Restrict superadmin access

all

Limit superadmin account usage and implement strict access controls for administrative functions.

Disable logo upload functionality

all

Temporarily disable the company logo upload feature until patched.

🧯 If You Can't Patch

  • Implement strict file upload validation to reject PNG files containing PHP code in IDAT chunks.
  • Monitor and audit all superadmin account activities and file uploads to the /api/v1/company/upload-logo endpoint.

🔍 How to Verify

Check if Vulnerable:

Check if Crater version is 6.0.6 or earlier and verify if the /api/v1/company/upload-logo endpoint exists without proper file validation.

Check Version:

Check composer.json or application configuration for version number, or run: php artisan --version (if using Laravel artisan)

Verify Fix Applied:

Verify Crater version is 6.0.7 or later and test that PNG files with embedded PHP code in IDAT chunks are rejected.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads to /api/v1/company/upload-logo
  • Superadmin account performing unexpected logo uploads
  • PHP execution errors from uploaded files

Network Indicators:

  • POST requests to /api/v1/company/upload-logo with PNG files
  • Unusual outbound connections from web server after logo uploads

SIEM Query:

source="web_logs" AND (url="/api/v1/company/upload-logo" OR file_upload="*.png") AND user_role="superadmin"

🔗 References

📤 Share & Export