CVE-2026-39353: InvoicePlane: Remote Code Execution via Writable Templates Directory
InvoicePlane is a self-hosted open source application for managing invoices, clients, and payments. Prior to 1.7.2-rc-1, InvoicePlane builds its permitted template list by scanning a PHP template directory that can be written through an administrator-controlled file-write capability. A malicious PHP file placed in the directory is automatically trusted by Mdltemplates and can be selected as publicinvoicetemplate. When a public invoice is rendered, the guest View controller includes the trusted file and executes it with web-server privileges. This issue is fixed in version 1.7.2-rc-1.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
InvoicePlaneto a version that resolves this vulnerability.Fixed in 1.7.2-rc-1
Event History
Frequently Asked Questions
Who is realistically able to exploit this issue?
An attacker needs access to an administrator-controlled capability that can write files into the PHP template directory. They must be able to place a malicious PHP file there and select it as the public invoice template.
Is guest or public access enough to trigger code execution?
Guest access can trigger execution only after a malicious template has already been placed in the trusted template directory and selected as public_invoice_template. Rendering a public invoice then includes the file with web-server privileges.
What versions are affected and what fixes the issue?
InvoicePlane versions prior to 1.7.2-rc-1 are affected. The issue is fixed in 1.7.2-rc-1.
How can I check whether an instance may already be affected?
Inspect the PHP template directory for unexpected PHP files and review which file is configured as public_invoice_template. Any unrecognized template that can be selected for public invoice rendering should be treated as suspicious.