CVE-2022-30470

9.8 CRITICAL

📋 TL;DR

This vulnerability in Afian FileRun allows attackers to achieve remote code execution by modifying the 'search_tika_path' variable to point to a malicious JAR file. Attackers can upload their own JAR file and then change the configuration to execute it, running commands as the webserver user. All FileRun installations using version 20220202 are affected.

💻 Affected Systems

Products:
  • Afian FileRun
Versions: 20220202
Operating Systems: All platforms running FileRun
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default configuration of FileRun 20220202. No special configuration is required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary code as the webserver user, potentially leading to data theft, ransomware deployment, or lateral movement within the network.

🟠

Likely Case

Attackers gain webserver user privileges and can access/modify files, execute commands, and potentially escalate privileges further on the host system.

🟢

If Mitigated

With proper network segmentation and least privilege, impact is limited to the webserver's capabilities and isolated from critical systems.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access to modify the search_tika_path variable and the ability to upload a JAR file. The attack chain is straightforward once these conditions are met.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after 20220202

Vendor Advisory: https://filerun.com/changelog

Restart Required: Yes

Instructions:

1. Backup your FileRun installation and database. 2. Download the latest FileRun version from the official website. 3. Replace the existing installation with the updated files. 4. Restart the web server service. 5. Verify the update was successful.

🔧 Temporary Workarounds

Restrict JAR file uploads

all

Configure web server or application to block uploads of JAR files to prevent attackers from uploading malicious payloads.

# For Apache: Add to .htaccess or virtual host config
<FilesMatch "\.(jar)$">
    Order Allow,Deny
    Deny from all
</FilesMatch>
# For Nginx: Add to server block
location ~*\.jar$ {
    deny all;
}

Restrict configuration modification

all

Limit access to FileRun configuration interface to only authorized administrators.

# Implement IP-based restrictions in web server config
# Example for Apache:
<Location "/admin/config">
    Require ip 192.168.1.0/24
</Location>

🧯 If You Can't Patch

  • Isolate the FileRun server from other critical systems using network segmentation.
  • Implement strict file integrity monitoring on the search_tika_path configuration and JAR upload directories.

🔍 How to Verify

Check if Vulnerable:

Check the FileRun version by examining the installation directory or admin interface. If version is exactly 20220202, the system is vulnerable.

Check Version:

Check the FileRun admin interface or examine the version.txt file in the installation directory.

Verify Fix Applied:

After updating, verify the version number has changed from 20220202. Test that the search_tika_path configuration cannot be modified to execute arbitrary JAR files.

📡 Detection & Monitoring

Log Indicators:

  • Unusual JAR file uploads to FileRun
  • Modifications to search_tika_path configuration
  • Web server process spawning unexpected child processes

Network Indicators:

  • Outbound connections from web server to unexpected destinations
  • Unusual HTTP requests to configuration endpoints

SIEM Query:

source="filerun.log" AND ("search_tika_path" OR ".jar upload")

🔗 References

📤 Share & Export