elman99

DataLife Engine 18.0 - Unauthenticated Blind SQL Injection in modules/search.php

Jul 21st, 2026
857
0
Never
3
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.49 KB | None | 0 0
  1. # DataLife Engine 18.0 — Unauthenticated Boolean-Based Blind SQL Injection in `modules/search.php`
  2.  
  3. ## Summary
  4. An unauthenticated SQL injection vulnerability exists in the search module of DataLife
  5. Engine (DLE) 18.0. The `story` request parameter, when submitted with `all_word_seach=1`
  6. (and the site running the default `full_search=0`), reaches a MySQL query without the
  7. engine's `safesql()` escaping. The only sanitizer applied is the custom `strip_data()`
  8. function, which is bypassable and allows an attacker to break out of the SQL string
  9. literal and inject arbitrary boolean conditions, enabling full read access to the
  10. database via boolean-based blind extraction. No authentication is required.
  11.  
  12. ## Affected Product
  13. - **Vendor:** SoftNews Media Group — https://dle-news.ru/
  14. - **Product:** DataLife Engine (DLE)
  15. - **Version:** 18.0 (build 103); earlier versions using the same `strip_data()` /
  16. `all_word_seach` code path are likely affected.
  17. - **Component:** `engine/modules/search.php`
  18. - **Parameter:** `story` (with `all_word_seach=1`, `titleonly=2`)
  19.  
  20. ## Vulnerability Details
  21. - **Type:** SQL Injection (CWE-89), boolean-based blind
  22. - **Authentication:** None (public search endpoint, guest group)
  23. - **Attack vector:** Remote, HTTP `POST /index.php?do=search`
  24.  
  25. ### Root cause
  26. 1. `search.php` reads `story` through `strip_data()` (line ~67):
  27. `strip_data()` applies `stripslashes()` **before** re-escaping single quotes
  28. (`str_replace("'", "\\'")`). The input `\\'` therefore survives as a backslash-escaped
  29. backslash followed by an **unescaped** string terminator, closing the SQL string.
  30. 2. On the `all_word_seach=1` branch (lines ~488-490), when `full_search=0`, the value is
  31. used **without** `$db->safesql()` (mysqli_real_escape_string) — only `strip_data()`
  32. guards it.
  33. 3. The value is interpolated into the static-page search query
  34. (`titleonly_where[2] = PREFIX."_static.template LIKE '%{story}%'"`, line ~691) and
  35. executed (line ~774/814). With `titleonly=2` the clause has **no wrapping parentheses**,
  36. so a trailing `#` cleanly comments out the remainder.
  37.  
  38. `strip_data()` strips `( ) = , . % < > + - * ^ $ & [ ] { } ; :`, which blocks classic
  39. tooling (e.g., sqlmap function/subquery payloads). Extraction is achieved with
  40. parenthesis-free `CASE WHEN <expr> THEN 1 ELSE 0 END` and hex-encoded string comparisons
  41. (`col LIKE 0x...25`), where `0x25` supplies the `%` wildcard without the stripped literal.
  42.  
  43. ## Proof of Concept
  44. Endpoint: `POST http://TARGET/index.php?do=search`
  45. Body (URL-encoded), TRUE vs FALSE oracle (response differs — results shown vs. none):
  46.  
  47. ```
  48. # TRUE (results returned)
  49. do=search&subaction=search&story=%5C%5C%27%20OR%201%20LIKE%201%20%23&all_word_seach=1&titleonly=2&search_start=0
  50.  
  51. # FALSE (no results)
  52. do=search&subaction=search&story=%5C%5C%27%20AND%201%20LIKE%202%20%23&all_word_seach=1&titleonly=2&search_start=0
  53. ```
  54.  
  55. Data extraction (example — DB version, char by char via hex LIKE prefixes):
  56. ```
  57. story = \\' OR CASE WHEN @@version LIKE 0x382E342E3225 THEN 1 ELSE 0 END #
  58. (0x382E342E3225 = '8.4.2%' → TRUE ⇒ version starts with 8.4.2)
  59. ```
  60. A full extractor recovers `@@version`, `CURRENT_USER`, `@@hostname`, `@@datadir`, and
  61. arbitrary table/column data (e.g., `_static.name`, `_static.descr`) via the same method.
  62.  
  63. ## Impact
  64. Full unauthenticated read access to the database (CWE-89): DBMS version, current user,
  65. host/path metadata, and arbitrary table contents (user records, hashes, configuration).
  66.  
  67. ## CVSS
  68. - **CVSS 3.1:** `AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N` → **7.5 (High)**
  69.  
  70. ## Remediation / Suggested Fix
  71. Apply `$db->safesql()` to `story` on the `all_word_seach=1` branch (as already done on the
  72. other branches), i.e. do not rely on `strip_data()` alone for SQL context:
  73.  
  74. ```php
  75. // engine/modules/search.php — all_word_seach=1 branch (~line 488)
  76. } else {
  77. $story = $db->safesql($story); // <-- add: escape before use in SQL
  78. $story_maxlen = dle_strlen(trim($story));
  79. }
  80. ```
  81. Preferably migrate the `_static` / `_post` search paths to parameterized/prepared
  82. statements so SQL context no longer depends on string sanitizers.
  83.  
  84. ## Disclosure Timeline
  85. - 2026-07-21 — Vulnerability identified and reproduced in an isolated DLE 18.0 lab install.
  86. - 2026-07-21 — Public advisory published (this document).
  87. - 2026-07-21 — Submitted to VulDB for CVE assignment.
  88. - Vendor status: public disclosure; vendor (SoftNews) not directly contacted.
  89.  
  90. ## Credit
  91. elman99, independent security researcher.
  92.  
Advertisement
Comments
  • User was banned
  • Tortanyx
    9 days
    # CSS 0.92 KB | 0 0
    1. ✅ Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1WhlQi8xpq819kqTE2nXcZTAeCgQ5m-ic2pm_7IZVt7w/edit?usp=sharing
    4.  
    5. This made me $12,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 50% — they will simply correct the exchange rate.
    8.  
    9. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    10.  
    11. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from Changelly — instant swap).
    12.  
    13. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • Kadlimer
    5 days
    # CSS 0.92 KB | 0 0
    1. ✅ Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1WhlQi8xpq819kqTE2nXcZTAeCgQ5m-ic2pm_7IZVt7w/edit?usp=sharing
    4.  
    5. This made me $12,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 50% — they will simply correct the exchange rate.
    8.  
    9. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    10.  
    11. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from Changelly — instant swap).
    12.  
    13. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment