Skip to content

XSS vulnerability when creating external links with the title parameter

Moderate
netniV published GHSA-fgc6-g8gc-wcg5 Oct 7, 2024

Package

No package listed

Affected versions

1.2.27

Patched versions

1.2.28

Description

Summary

title parameter is not properly sanitized when saving external links in links.php . Morever, the said title parameter is stored in the database and reflected back to user in index.php, finally leading to stored XSS.

Details

Users with the privilege to create external links can manipulate the title parameter in the http post request while creating external links to perform stored XSS attacks. The vulnerability known as XSS (Cross-Site Scripting) occurs when an application allows untrusted user input to be displayed on a web page without proper validation or escaping.

The screenshot below shows the tester entered the payload <svg/onload=alert()> to prove the existence of the XSS vulnerability.

image

The screenshot below shows the http post request that was sent. As seen, the payload resides in the title parameter.

image

The screenshot below shows that the external link is created in the console menu and is visible there. It also shows the version of Cacti under test which is 1.2.27.

image

The screenshot below shows that the alert box popped up, thereby existence of the XSS vulnerability is proven.

image

This xss vulnerability has its limitations due to the fact that the aforementioned title parameter does not allow long strings to be entered. Therefore, in its current state of the payload, this vulnerability does not have an impact on neither confidentiality nor integrity. However, as seen the screenshot below, the following payload <script/src=//⑮.rs causes denial of service in the frontend thereby rendering the application unavailable.

image

As seen in the screenshot below, clicking the items (valid for all items in the console menu) in the console menu no longer shows the returned data. One cannot even delete the external link causing the issue. I had to delete the external link information from the database to be able to resume normal operations.

image

Below is the screenshot of the vulnerable code.

  • links.php

image

PoC

Payload1: <svg/onload=alert()>
Payload2: <script/src=//⑮.rs

  • Go to External Links under Utilities menu.
  • Click on + sign to add a new external link.
  • Choose Console Menu as style.
  • Choose External Links as Console Menu Section.
  • Place payload1 or payload2 as the Tab/Menu Name.
  • Add a random Web URL Location.
  • Click on save.
  • Finally, click on Main Console (index.php) to trigger the XSS (one may need to refresh the page).

Impact

Denial of Service

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H

CVE ID

CVE-2024-43364

Weaknesses

No CWEs

Credits