| शीर्षक | https://code-projects.org/ blog site in php with source code 1.0 SQL Injection |
|---|
| विवरण | The vulnerability resides within the category_exists function in resources/functions/blog.php, which handles user input processed via add_category.php. Although the code attempts to sanitize user input ($name and $field) using the mysql_real_escape_string() function, this defense mechanism is insufficient and inherently flawed, particularly because the program relies on the deprecated and unsafe mysql_\* extension.
The code is vulnerable to Wide-Byte Injection. If the database connection is configured to use a multi-byte character set, such as GBK or BIG5, an attacker can prepend their malicious payload with a specific leading byte (e.g., 0xdf in GBK).
When mysql_real_escape_string() encounters a single quote ('), it prefixes it with a backslash (\, or 0x5c). The vulnerable database server, interpreting the payload as a multi-byte stream, combines the attacker's leading byte (0xdf) with the inserted backslash (0x5c) to form a new, valid, non-backslash multi-byte character. This effectively consumes the backslash, allowing the subsequent single quote to escape and close the SQL string prematurely, leading to injection. |
|---|
| स्रोत | ⚠️ https://github.com/Yohane-Mashiro/cve/blob/main/SQL%20injection1.md |
|---|
| उपयोगकर्ता | Yohane-Mashiro (UID 92825) |
|---|
| सबमिशन | 20/11/2025 05:22 PM (5 महीनों पहले) |
|---|
| संयम | 23/11/2025 08:54 AM (3 days later) |
|---|
| स्थिति | स्वीकृत |
|---|
| VulDB प्रविष्टि | 333339 [code-projects Blog Site 1.0 Category blog.php category_exists name/field SQL इंजेक्शन] |
|---|
| अंक | 20 |
|---|