Fossbilling is Vulnerable to HTML Injection During the Generation of Invoices, Which Leads To An Open Redirect Vulnerability. in fossbilling/fossbilling
Reported on
Jul 1st 2023
Description
FOSSBilling suffers from a lack of sanitization in the handling of admin input values. This issue manifests when clients attempt to generate invoices for their orders. Specifically, in the PDF generation of invoices, the company name, editable through the admin portal, is included. An attacker with administrative access could exploit this vulnerability by inserting a malicious link within the company name field. Consequently, this alteration would impact every client, potentially leading to an open redirect vulnerability.
Proof of Concept
<a href=https://evil.com>CLick here</a>
Steps:
- Log in to the application utilizing the administrator credentials.
- Access the URL: http://172.17.0.2/admin/extension/settings/system.
- Modify the company name to "<a href=https://evil.com>Click here</a>" and save the changes.
- Now, Proceed to log in as any client.
- Place an order for a specific domain.
- Navigate to the invoice section and click on the PDF option.
- Observe that the previously injected malicious HTML code is rendered within the PDF document.
This sequence of actions reveals a critical vulnerability in the application, whereby an attacker with administrative privileges can exploit the lack of input sanitization. By injecting a malicious link into the company name field, the compromised HTML code propagates throughout the software, affecting all clients. Consequently, when generating invoices in PDF format, the malicious HTML code is rendered, potentially leading to various security risks and exposing users to the attacker's intended actions.
Impact
- Malware Distribution: The attacker may utilize the injected HTML code to deliver malicious payloads or initiate drive-by downloads. This can result in the installation of malware on the client's system, leading to potential data breaches, system compromise, or further propagation of malware within the network.
- Brand Reputation Damage: If customers or clients receive invoices containing the injected HTML code, it can erode trust and damage the reputation of the affected organization. Such incidents may lead to financial losses, loss of business opportunities, and a negative impact on customer loyalty.
- Open Redirect Vulnerability: The bug also introduces an open redirect vulnerability, enabling the attacker to redirect users to arbitrary external websites. This can be exploited to conduct phishing attacks, deliver malware, or trick users into unknowingly visiting malicious pages that exploit additional vulnerabilities.
- Phishing Attacks: The injected HTML code can contain phishing links, redirecting users to malicious websites that mimic legitimate ones. This can trick unsuspecting users into providing their login credentials, personal information, or financial details, thereby facilitating identity theft, fraud, or further exploitation.
Occurrences
Service.php L156
the 'name' parameter does not have any mitigation for HTML tags
References
Thanks, I was able to replicate this. Although FYI your POC video isn't public, but this is a really easy one to test so it's not a big deal. I'll get a version of the patch you provided up as PR on our repo
Happy to have secured! Would it be possible to request the assignment of a CVE after the patch has been applied?
Thank you for your prompt response. Could you kindly explain why this particular issue is not eligible for a CVE? I noticed that there are other CVEs with the same vulnerability and similar or lower CVSS scores that have been assigned. https://nvd.nist.gov/vuln/detail/CVE-2023-34224 https://nvd.nist.gov/vuln/detail/CVE-2022-43950
@admin when I marked this vulnerability as valid I originally selected that it would not receive a CVE, however I have since changed my mind. When publishing, I selected the option to assigning it a CVE, but it doesn't appear that went through. Can we please get a CVE assigned?
Thank you.
@admin, can you please request a CVE for this vulnerability?
@admin, can you please request a CVE for this vulnerability?
@admin, can you please request a CVE for this vulnerability?
CVE assigned as requested:)
Abhishek, please avoid spamming the comment section and Chatwoot, we will get around to requests as quickly as we possibly can. Thanks!