CVE-2024-5356

6.3 MEDIUM

📋 TL;DR

This critical SQL injection vulnerability in anji-plus AJ-Report allows remote attackers to execute arbitrary SQL commands via the dynSentence parameter in the /dataSet/testTransform endpoint. Organizations using AJ-Report versions up to 1.4.1 are affected, potentially exposing database contents and system integrity.

💻 Affected Systems

Products:
  • anji-plus AJ-Report
Versions: up to 1.4.1
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the /dataSet/testTransform endpoint with swagger-ui interface accessible.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data manipulation, or full system takeover via SQL injection escalation.

🟠

Likely Case

Unauthorized data access, extraction of sensitive information, and potential database corruption.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and network segmentation in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit details are publicly available in GitHub issues and PDF documentation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://github.com/anji-plus/report/issues/34

Restart Required: No

Instructions:

Monitor GitHub repository for official patch. Consider upgrading to version after 1.4.1 when available.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement strict input validation for dynSentence parameter to block SQL injection patterns

Modify application code to sanitize dynSentence input using parameterized queries

Endpoint Restriction

all

Block or restrict access to /dataSet/testTransform endpoint

Configure web server (nginx/apache) to deny access to /dataSet/testTransform
Use firewall rules to block the endpoint

🧯 If You Can't Patch

  • Implement Web Application Firewall (WAF) with SQL injection rules
  • Network segmentation to isolate AJ-Report from critical databases

🔍 How to Verify

Check if Vulnerable:

Check if AJ-Report version is ≤1.4.1 and /dataSet/testTransform endpoint is accessible

Check Version:

Check application configuration files or web interface for version information

Verify Fix Applied:

Test the endpoint with SQL injection payloads to confirm they're blocked

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple requests to /dataSet/testTransform with SQL-like patterns

Network Indicators:

  • HTTP POST requests to /dataSet/testTransform containing SQL keywords

SIEM Query:

source="web_logs" AND uri="/dataSet/testTransform" AND (request CONTAINS "SELECT" OR request CONTAINS "UNION" OR request CONTAINS "INSERT")

🔗 References

📤 Share & Export