CVE-2022-24984

9.8 CRITICAL

📋 TL;DR

This vulnerability allows remote unauthenticated attackers to upload executable files to websites using vulnerable JQueryForm.com forms, leading to remote code execution. Attackers can bypass client-side file extension checks by uploading files with extensions like .phtml or .php.bak. Any website using JQueryForm.com forms with file-upload capability enabled before February 5, 2022 is affected.

💻 Affected Systems

Products:
  • JQueryForm.com forms
Versions: All versions before 2022-02-05
Operating Systems: Any OS running web servers with PHP support
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects forms with file-upload capability enabled. Requires server-side execution support for uploaded file types.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server compromise allowing attackers to execute arbitrary code, steal data, install malware, or pivot to other systems.

🟠

Likely Case

Attackers upload web shells to gain persistent access, deface websites, or use servers for malicious activities.

🟢

If Mitigated

File uploads are blocked or properly validated, preventing malicious file execution.

🌐 Internet-Facing: HIGH - Exploitable remotely without authentication, affecting publicly accessible web forms.
🏢 Internal Only: MEDIUM - Lower exposure but still exploitable if internal users can access vulnerable forms.

🎯 Exploit Status

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

Simple file upload bypass with publicly available proof-of-concept. No authentication required.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions from 2022-02-05 onward

Vendor Advisory: https://JQueryForm.com

Restart Required: No

Instructions:

1. Update to JQueryForm.com version from February 5, 2022 or later. 2. Replace all vulnerable form implementations with updated versions. 3. Test file upload functionality after update.

🔧 Temporary Workarounds

Server-side file validation

all

Implement server-side validation of file extensions and content types

Implement PHP validation: $allowed_extensions = ['jpg', 'png', 'pdf']; $file_extension = strtolower(pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION)); if (!in_array($file_extension, $allowed_extensions)) { die('Invalid file type'); }

Disable file upload capability

all

Temporarily disable file upload functionality in vulnerable forms

Remove or comment out file upload fields in form configuration

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block suspicious file uploads
  • Restrict upload directory permissions and disable script execution in upload directories

🔍 How to Verify

Check if Vulnerable:

Check if your website uses JQueryForm.com forms with file upload enabled and if implementation date is before February 5, 2022.

Check Version:

Check form implementation date in source code or contact JQueryForm.com for version information.

Verify Fix Applied:

Test file upload functionality with malicious extensions (.phtml, .php.bak) - they should be rejected with server-side validation.

📡 Detection & Monitoring

Log Indicators:

  • File upload attempts with .phtml, .php.bak, or other executable extensions
  • Unusual POST requests to upload endpoints
  • Files with executable extensions appearing in upload directories

Network Indicators:

  • POST requests with file uploads to form endpoints
  • Subsequent requests to uploaded executable files

SIEM Query:

source="web_logs" AND (uri_path="*upload*" OR method="POST") AND (user_agent="*curl*" OR user_agent="*wget*" OR file_extension="*.phtml" OR file_extension="*.php.bak")

🔗 References

📤 Share & Export