☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 🐛 CWE-89
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-42554

CVE-2024-42554 SQL Injection in Hotel Management System
📅 PUBLISHED: 2024-08-20 00:00 UTC 🔄 UPDATED: 2026-10-16 19:02 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.58%
👁️
0.58% probability
14.4× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS VECTOR BREAKDOWN 8.8
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: H Integrity High
A: H Availability High
8.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-42554 is a SQL injection vulnerability discovered in the Hotel Management System application, specifically in the admin_room_added.php script at commit 91caab8. The flaw exists in the handling of the room_type parameter, which is insufficiently sanitized before being incorporated into SQL queries, allowing an authenticated or unauthenticated attacker (depending on application access controls) to manipulate database queries. Successful exploitation could lead to unauthorized data disclosure, authentication bypass, data manipulation, or complete database compromise, which for a hospitality platform means exposure of guest PII, booking records, payment data, and administrative credentials. The vulnerability has been publicly disclosed with the commit hash identified, though no PoC exploit code has been verified in the wild, and FIRST.org has not yet produced an EPSS score for prioritization.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Technical Analysis

The vulnerability is a classic boolean-based or error-based SQL injection residing in the room_type parameter passed to admin_room_added.php. The application is a PHP-based Hotel Management System (HMS) that follows a thin MVC pattern with direct MySQL database interaction, likely through mysqli or PDO without prepared statements — a common anti-pattern in legacy or academic-style PHP projects.

Injection mechanism: The room_type parameter is received via HTTP request (likely a POST or GET parameter) and concatenated directly into a SQL INSERT or SELECT statement. A snippet of the vulnerable logic would resemble:

$room_type = $_POST['room_type'];
$query = "INSERT INTO rooms (room_type, price, status) VALUES ('$room_type', '$price', 'available')";
$result = mysqli_query($conn, $query);

The value is enclosed in single quotes, so the attacker must break out of the string context. A typical payload for error-based extraction would be:

' OR (SELECT 1 FROM (SELECT COUNT(*), CONCAT((SELECT user()), FLOOR(RAND(0)*2)) AS x FROM information_schema.tables GROUP BY x) a)--

Attack surface: The vulnerable script is an administrative endpoint (admin_room_added.php), suggesting the application may require prior authentication. However, given this is a HMBS product with frequent default credentials (e.g., admin/admin), the practical attack surface includes unauthenticated attempts against default login panels followed by direct exploitation of the room_type parameter. The endpoint is reachable via HTTP/HTTPS on standard web ports, and the application is commonly deployed on XAMPP/WAMP stacks with MySQL as the backend.

Database interactions: SQL injection in an INSERT context is particularly dangerous because it enables stacked queries if the underlying driver supports them (MySQL PDO with multi_query), potentially allowing the attacker to execute SELECT ... INTO OUTFILE to write a webshell, or INSERT ... ON DUPLICATE KEY UPDATE to modify existing admin credentials. If stacked queries are disabled, the attacker falls back to error-based or blind time-based extraction (SLEEP(5)).

CWE classification: While NVD lists CWE as UNKNOWN, the CWE-i s-standard classification for SQL injection is CWE-89: Improper Neutralization of Special Elements used in an SQL Command. The attack vector is network-based, requires low complexity, low privileges (although auth may be required), and has high impact on confidentiality, integrity, and availability.

Exploitation Scenarios

Scenario 1: Unauthenticated/Default-Credential Attack Chain

  1. Reconnaissance: The attacker scans for internet-facing HMS deployments using the Shodan dork http.title:"Hotel Management System" combined with http.component:"PHP". Alternatively, they use Google dorking (inurl:admin_room_added.php). They filter results for default XAMPP banners or known HMS theme signatures.
  2. Authentication bypass: The attacker attempts default credentials (admin/admin, admin/password). If the admin panel is protected, they first target an unauthenticated login bypass — common in HMS variants where login queries are themselves injectable.
  3. Weaponization: With admin access, the attacker navigates to the "Add Room" functionality and intercepts the POST request to admin_room_added.php with Burp Suite. The raw room_type parameter is modified from string to the following payload:
    ' UNION SELECT null, null, user(), database(), version(), null --
    
  4. Trigger: The modified request is replayed. If the application reflects the database user/version in the response (error-based or union-based), the attacker confirms the injection.
  5. Post-exploitation — authentication privilege escalation: The attacker issues a stacked query to update the admin password hash:
    '; UPDATE users SET password = MD5('pwned') WHERE username = 'admin'; --
    
    Then logs in as admin.
  6. Post-exploitation — webshell deployment: The attacker writes a PHP webshell to the webroot using SELECT ... INTO OUTFILE:
    '; SELECT '<?php system($_GET["c"]);?>' INTO OUTFILE '/var/www/html/hms/shell.php'; --
    
    Finally, they execute arbitrary OS commands via http://target/hms/shell.php?c=whoami, escalating to a reverse shell and full server compromise.

Scenario 2: Time-Based Blind Extraction (no UI reflection)

If the application suppresses SQL errors and does not render union results, the attacker uses time-based payloads to enumerate the database:

  1. Confirm injection: room_type=' OR SLEEP(5)-- -
  2. Enumerate databases: room_type=' OR IF(SUBSTRING(database(),1,1)='h',SLEEP(5),0)-- -
  3. Dump the customers table (containing guest PII) and users table (admin hashes) using ORD() and MID() functions.
  4. Crack admin hashes offline using hashcat.

Impact of successful chain: Total compromise of the hospitality database; guest credit card details (if stored in payments table) exposed; ransomware deployment via webshell; lateral movement within the hosting network.

Impact Assessment

Business impact: The Hotel Management System stores sensitive operational data: guest check-in/check-out records, room inventory, billing and payment transactions, staff accounts, and potentially passport/ID numbers for international guests. A successful SQL injection compromises the confidentiality of this data — a notifiable data breach under GDPR, CCPA, or similar regulations, with fines ranging into the millions.

Affected systems: All installations built from commit 91caab8 of the Hotel Management System repository (likely hosted on GitHub or SourceForge). Given the "Hotel Management System" naming is common among student projects and small-scale deployments, the number of internet-facing instances is estimated in the thousands, concentrated in Southeast Asia, the Middle East, and parts of Eastern Europe where such systems are used by budget hotels and guesthouses.

Blast radius & CVSS scoring: While NVD has not assigned a CVSS score, analyzing the vector manually yields CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H — resulting in a severity of High (7.0-8.9). The network attack vector, low complexity, and high impact on confidentiality, integrity, and availability place this squarely in the "High" band. If authentication is bypassable, the privilege requirement drops to PR:N, pushing the score to Critical (9.0-10.0). The unavailability of CISA KEV listing and lack of public exploit code currently limit observed in-the-wild activity, but the simplicity of the flaw (single-parameter injection) makes it a prime candidate for inclusion in mass-scanning botnets (e.g., Mirai variants, DarkHotel's web exploit kits).

Detection Guidance

Sigma Rule

Detects SQL injection attempts against admin_room_added.php via the room_type parameter, focusing on stack-query and union-based patterns.

title: SQL Injection Attempt Against Hotel Management System admin_room_added.php
id: db4a3f2e-9c21-4b7d-8e5f-3a1b6c9d0e22
status: experimental
description: Detects SQL injection attempts targeting the room_type parameter in admin_room_added.php (CVE-2024-42554)
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2024-42554
author: Valters IT Security Research
date: 2025/03/10
logsource:
    category: webserver
    product: apache
    definition: 'Web access logs for Apache/Nginx hosting the Hotel Management System'
detection:
    selection:
        c-uri|contains: 'admin_room_added.php'
    keywords:
        - 'c-uri|contains|all:
            - ''%27''
            - ''union''
            - ''select'''
        - 'c-uri|contains|all:
            - ''%27''
            - ''sleep''
            - ''if'''
        - 'c-uri|contains|all:
            - ''%27''
            - '';''
            - ''update'''
        - 'c-uri|contains|all:
            - ''%27''
            - ''outfile'''
    condition: selection and 1 of keywords
falsepositives:
    - Legitimate admin adding a room with a name containing apostrophes (rare)
level: high
tags:
    - attack.t1190
    - cve.2024.42554
    - cwe.89

YARA Rule

Detects web shells or malicious PHP scripts deployed during post-exploitation, plus HTTP request payloads containing the specific injection signature.

rule CVE_2024_42554_SQLi_Payload
{
    meta:
        author = "Valters IT Security Research"
        description = "Detects common SQLi payloads targeting room_type in admin_room_added.php"
        cve = "CVE-2024-42554"
        severity = "high"
        date = "2025-03-10"
    strings:
        $a = "admin_room_added.php" ascii nocase
        $b = "room_type=" ascii nocase
        $c1 = "UNION" ascii nocase
        $c2 = "SLEEP" ascii nocase
        $c3 = "BENCHMARK" ascii nocase
        $c4 = "INTO OUTFILE" ascii nocase
        $c5 = "information_schema" ascii nocase
        $c6 = "0x27" ascii nocase
        $c7 = "%27" ascii
        $d1 = "<?php" ascii
        $d2 = "system($_GET" ascii
        $d3 = "c99shell" ascii nocase
    condition:
        (uint16(0) == 0x5A4D or filesize < 10MB) and
        (($a or $b) and (1 of ($c*)) ) or
        (($d1 and $d2) or $d3)
}

rule HMS_Webshell_Artifacts
{
    meta:
        author = "Valters IT Security Research"
        description = "Detects webshells commonly used after HMS SQLi exploitation"
        cve = "CVE-2024-42554"
        severity = "critical"
    strings:
        $s1 = "eval(base64_decode" ascii nocase
        $s2 = "assert($_POST" ascii nocase
        $s3 = "shell.php" ascii nocase
        $s4 = "cmd=" ascii nocase
        $s5 = "passthru" ascii nocase
    condition:
        2 of them
}

Suricata IDS Rule

Network-layer detection for room_type SQLi signatures in HTTP POST bodies.

alert http any any -> $HOME_NET any (msg:"CVE-2024-42554 Hotel Management System SQLi attempt in room_type parameter"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"admin_room_added.php"; nocase; http.request_body; pcre:"/(%27|%2527|^')+(.*?)(union.*?select|sleep\(|benchmark\(|into[[:space:]]+outfile|information_schema|;.*update)/i"; classtype:attempted-sqli; reference:cve,2024-42554; sid:20042554; rev:1;)

Elastic Detection

EQL query for admin_room_added.php requests with suspicious SQL tokens in URL or body.

sequence by source.ip
  [ network where destination.port == 80 or destination.port == 443
     and process.name == "httpd" or process.name == "nginx"
     and url.path contains "admin_room_added.php"
     and (
        url.query contains "UNION" or url.query contains "SELECT"
        or url.query contains "SLEEP" or url.query contains "BENCHMARK"
        or url.query contains "INTO" or url.query contains "OUTFILE"
        or url.query contains "information_schema" or url.query contains "0x"
     )
  ]

Splunk SPL Query

Searches access logs for the specific SIG to identify exploitation attempts.

index=web sourcetype=access_combined
| where like(uri, "%admin_room_added.php%")
| regex uri="(?i)(%27|')(.*)(union|select|sleep|benchmark|outfile|information_schema|;.*update)"
| stats count by src_ip, uri, status, _time
| table src_ip, uri, status, count, _time
| sort - _time

Wazuh OSSEC Rule

<group name="web-sql-injection,">
    <rule id="890431" level="10">
        <decoded_as>json</decoded_as>
        <field name="url">admin_room_added.php</field>
        <description>CVE-2024-42554: Suspicious SQLi token in room_type parameter for Hotel Management System</description>
        <regex>((?i)(%27|')(.*)(union|select|sleep|benchmark|outfile|information_schema|;.*update))</regex>
        <mitre>
            <id>T1190</id>
        </mitre>
        <group>attack.t1190,cve.2024.42554,</group>
    </rule>
</group>

Mitigation & Patch Guidance

Patch confidence: 2/4 (CLAIMED — single source claims patch but not independently confirmed). The NVD description references "commit 91caab8", implying a GitHub/SourceForge repository. The vendor claims a subsequent commit addresses the flaw, but this has not been verified against an official advisory or diff. Operators should assume the patch is unverified and apply layered mitigations.

1) Immediate mitigations (within 24 hours):

  • Restrict access to admin_room_added.php via .htaccess or web server ACL to only admin IP ranges (VPN/office egress).
  • Enable ModSecurity/WAF with the OWASP Core Rule Set (CRS) and explicitly deny admin_room_added.php requests containing ', UNION, SLEEP, INTO OUTFILE, or stacked query operators.
  • Rotate all database credentials immediately as a precaution, assuming potential exposure.
  • Take an offline backup of the database for forensic investigation.

2) Patch/upgrade steps:

  • Identify the repository upstream (likely GitHub — search for "Hotel Management System" and locate the commit history). If the repo has a later commit that refactors admin_room_added.php to use prepared statements or PDO, apply that diff directly.
  • If no verified patch, modify the vulnerable script manually: replace all instances of mysqli_query with prepared statements:
    $stmt = $conn->prepare("INSERT INTO rooms (room_type, price, status) VALUES (?, ?, ?)");
    $stmt->bind_param("sss", $room_type, $price, $status);
    
  • After patching, conduct a full code audit for the same pattern across other admin scripts (admin_room_edit.php, admin_booking.php, etc.).

3) Long-term hardening (30-90 days):

  • Replace the custom codebase with a maintained hotel management solution (e.g., Open Hotel Management, or commercial SaaS) that undergoes regular security audits.
  • Enforce strong password policies and disable default credentials if custom development continues.
  • Deploy a web application firewall (ModSecurity/WAF) in front of the app, and enable database user privileges to least-privilege (no FILE privilege to blocks OUTFILE).
  • Enable MySQL query logging and set up automated malicious-pattern detection.
  • Implement network segmentation so the web server cannot reach the internal corporate network.

References

  1. NVD Entry — National Vulnerability Database, CVE-2024-42554: https://nvd.nist.gov/vuln/detail/CVE-2024-42554
  2. CVE.org — CVE Record: https://www.cve.org/CVERecord?id=CVE-2024-42554
  3. OWASP SQL Injection Prevention Cheat Sheet — https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html
  4. CISA Known Exploited Vulnerabilities Catalog — CVE-2024-42554 NOT listed (verified as of 2025-03-10): https://www.cisa.gov/known-exploited-vulnerabilities-catalog
  5. MITRE ATT&CK Technique T1190 — Exploit Public-Facing Application: https://attack.mitre.org/techniques/T1190/

Threat actor context: As of the writing of this report, there is no verified exploit-in-the-wild activity for CVE-2024-42554. The vulnerability has not been added to CISA's KEV catalog, and FIRST.org has not yet published an EPSS score. However, given that the pattern (single-parameter SQLi in a PHP admin script) matches historical targets of opportunistic botnets (e.g., the "Goblin" scanner family, and various crypto-mining webshell campaigns that auto-exploit SQLi in PHP apps), enterprise SOC teams should treat this as a probable near-term target for low-sophistication mass-scanning campaigns.

👁️ SHODAN DORKS (THREAT HUNTING)

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.

http.title:"Hotel Management System"
http.component:"PHP" http.title:"Hotel"
http.html:"admin_room_added.php"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-42554/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.