CVE-2022-24831

8.3 HIGH

📋 TL;DR

This SQL injection vulnerability in OpenClinica allows attackers to execute arbitrary SQL commands by manipulating input data. It affects all OpenClinica installations running versions prior to 3.16.1, 3.15.9, 3.14.1, and 3.13.1. The vulnerability stems from improper use of string concatenation instead of prepared statements in SQL queries.

💻 Affected Systems

Products:
  • OpenClinica
Versions: All versions prior to 3.16.1, 3.15.9, 3.14.1, and 3.13.1
Operating Systems: All supported platforms
Default Config Vulnerable: ⚠️ Yes
Notes: All OpenClinica deployments using vulnerable versions are affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data manipulation, privilege escalation, and potential remote code execution via database functions.

🟠

Likely Case

Unauthorized data access, data modification, and potential extraction of sensitive clinical trial data.

🟢

If Mitigated

Limited impact with proper network segmentation, database permissions, and input validation at other layers.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

SQL injection vulnerabilities are typically easy to exploit with basic web security testing tools.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.16.1, 3.15.9, 3.14.1, or 3.13.1

Vendor Advisory: https://github.com/OpenClinica/OpenClinica/security/advisories/GHSA-5289-4jwp-xp9h

Restart Required: Yes

Instructions:

1. Backup your OpenClinica installation and database. 2. Download the patched version from the official OpenClinica repository. 3. Follow the OpenClinica upgrade documentation for your specific version. 4. Restart the application server. 5. Verify the fix by checking the version and testing functionality.

🔧 Temporary Workarounds

No official workarounds

all

The vendor states no known workarounds exist for this vulnerability.

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate OpenClinica from untrusted networks
  • Deploy a web application firewall (WAF) with SQL injection detection rules

🔍 How to Verify

Check if Vulnerable:

Check the OpenClinica version in the application interface or configuration files. If version is earlier than 3.16.1, 3.15.9, 3.14.1, or 3.13.1, the system is vulnerable.

Check Version:

Check the OpenClinica web interface or examine the application configuration files for version information.

Verify Fix Applied:

After patching, verify the version shows 3.16.1, 3.15.9, 3.14.1, or 3.13.1 or higher. Test application functionality and consider running SQL injection tests in a controlled environment.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in application logs
  • Multiple failed login attempts followed by SQL syntax errors
  • Long or unusual parameter values in HTTP requests

Network Indicators:

  • HTTP requests containing SQL keywords in parameters
  • Unusual database query patterns from application server

SIEM Query:

source="openclinica.logs" AND ("SQL syntax" OR "SQL error" OR "prepared statement")

🔗 References

📤 Share & Export