Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-50547 Overview
InvoicePlane, a self-hosted open source application for managing invoices, clients, and payments, contains a path traversal vulnerability prior to version 1.7.2. The Invoices::generate_xml() method appends a database-derived xml_id value to the XMLconfigs helper directory and includes the resulting PHP path without validating the identifier. A low-privileged attacker who can influence the e-invoice configuration can use traversal sequences to include an existing PHP file on the server. The advisory establishes local file inclusion (LFI) only; achieving code execution requires a separate file-upload or file-write primitive. The issue is tracked under [CWE-22] and is fixed in version 1.7.2.
Critical Impact
Authenticated attackers with access to e-invoice configuration can traverse the filesystem to include arbitrary PHP files, potentially chaining with a file-write primitive for remote code execution.
Affected Products
- InvoicePlane versions prior to 1.7.2
- Self-hosted InvoicePlane deployments exposing the invoice generation workflow
- Instances where low-privileged users can modify e-invoice configuration entries
Discovery Timeline
- 2026-09-25 - CVE-2026-50547 published to NVD
- 2026-09-28 - Last updated in NVD database
Technical Details for CVE-2026-50547
Vulnerability Analysis
The vulnerability resides in application/modules/invoices/controllers/Invoices.php within the generate_xml() method. The method reads an xml_id value from the database and concatenates it directly into a filesystem path under APPPATH . 'helpers/XMLconfigs/'. The resulting path is then passed to PHP's include statement without validation. Because the identifier accepts arbitrary string content, an attacker can inject ../ sequences to escape the intended directory and include any .php file reachable from the web server process.
The standalone impact is local file inclusion. However, when combined with a secondary primitive, such as log poisoning, session file injection, or an upload endpoint that writes attacker-controlled PHP content, the LFI becomes a reliable remote code execution vector.
Root Cause
The root cause is missing input validation on a database-sourced identifier that is used in a filesystem path. The original code only checked that the resulting file existed and was includable, not that the identifier conformed to a safe character set. This matches [CWE-22]: Improper Limitation of a Pathname to a Restricted Directory.
Attack Vector
Exploitation requires network access to the InvoicePlane interface and authenticated low-privileged access sufficient to modify the e-invoice configuration. The attacker sets the xml_id to a traversal string pointing at an existing PHP file, then triggers invoice XML generation to force the include.
$options = [];
$generator = $xml_id;
$path = APPPATH . 'helpers/XMLconfigs/';
- if ($xml_id && file_exists($path . $xml_id . '.php') && include $path . $xml_id . '.php') {
+ $is_valid_xml_id = is_string($xml_id) && preg_match('/^[A-Za-z0-9-]+$/', $xml_id) === 1;
+ if ($is_valid_xml_id && file_exists($path . $xml_id . '.php') && include $path . $xml_id . '.php') {
$embed_xml = $xml_setting['embedXML'];
$XMLname = $xml_setting['XMLname'];
$options = (empty($xml_setting['options']) ? $options : $xml_setting['options']); // Optional
Source: InvoicePlane commit 07ebd6b. The patch adds a strict preg_match('/^[A-Za-z0-9-]+$/', $xml_id) allowlist check before the file existence test and include.
Detection Methods for CVE-2026-50547
Indicators of Compromise
- Database rows in e-invoice configuration tables where xml_id contains ../, slashes, backslashes, or null bytes.
- Web server access logs showing POST requests to invoice configuration endpoints followed by XML generation requests from the same low-privileged account.
- PHP error logs referencing unexpected file paths loaded from helpers/XMLconfigs/ with traversal segments.
Detection Strategies
- Review all xml_id values stored by InvoicePlane and flag any entry that does not match the pattern ^[A-Za-z0-9-]+$.
- Monitor file-include telemetry from the PHP process for paths outside APPPATH/helpers/XMLconfigs/.
- Correlate configuration-change events with subsequent invoice generation calls to identify abuse patterns.
Monitoring Recommendations
- Enable PHP open_basedir restrictions and alert on violations touching the InvoicePlane application root.
- Forward web server and PHP error logs to a central SIEM for pattern matching on traversal strings in request bodies and database writes.
- Track account activity for low-privileged users modifying e-invoice settings outside normal business workflows.
How to Mitigate CVE-2026-50547
Immediate Actions Required
- Upgrade InvoicePlane to version 1.7.2 or later, which enforces the xml_id character allowlist.
- Audit existing xml_id database entries and reset any value that contains characters outside [A-Za-z0-9-].
- Restrict access to the e-invoice configuration interface to trusted administrators until the patch is applied.
Patch Information
The fix is included in InvoicePlane v1.7.2 and delivered via Pull Request #1560. Full technical context is documented in GitHub Security Advisory GHSA-9248-qccw-7x7j.
Workarounds
- Apply a web application firewall rule that blocks requests to invoice configuration endpoints containing ../, URL-encoded traversal sequences, or path separators in the xml_id field.
- Configure PHP open_basedir to restrict include operations to the InvoicePlane application directory tree.
- Remove or disable write access to any directory where authenticated users can place PHP content, breaking potential LFI-to-RCE chains.
# Example PHP open_basedir restriction in php.ini or vhost config
php_admin_value open_basedir "/var/www/invoiceplane/:/tmp/"
# Example nginx rule to block traversal payloads in POST bodies
if ($request_body ~* "xml_id=[^&]*\.\./") {
return 403;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

