GHSA-x525-54hf-xr53

Suggest an improvement
Source
https://github.com/advisories/GHSA-x525-54hf-xr53
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/05/GHSA-x525-54hf-xr53/GHSA-x525-54hf-xr53.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-x525-54hf-xr53
Aliases
Published
2024-05-10T15:29:59Z
Modified
2024-05-14T20:18:48.832615Z
Severity
  • 9.6 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H CVSS Calculator
Summary
Blind XSS Leading to Froxlor Application Compromise
Details

Description:

A Stored Blind Cross-Site Scripting (XSS) vulnerability has been identified in the Failed Login Attempts Logging Feature of the Froxlor Application. Stored Blind XSS occurs when user input is not properly sanitized and is stored on the server, allowing an attacker to inject malicious scripts that will be executed when other users access the affected page. In this case, an unauthenticated User can inject malicious scripts in the loginname parameter on the Login attempt, which will then be executed when viewed by the Administrator in the System Logs.

The application protects users against XSS attacks by utilizing an xss sanitization library. But the checks of the library were bypassed by crafting an XSS Payload using data binding and interpolation of Vue.js

A working XSS payload was crafted which forces an administrator to add a new malicious attacker-controlled Administrator User. The Payload is: payload.txt

By exploiting this vulnerability, an unauthenticated attacker can force the Administrator to perform actions without the administrator even noticing anything suspicious. In one scenario, I made an exploit that forced the administrator to add an attacker-controlled Administrator into the Froxlor Application, resulting in a compromise of the Froxlor Application.

Impact:

The impact of this vulnerability is severe as it allows an attacker to compromise the Froxlor Application. By exploiting this vulnerability, the attacker can perform various malicious actions such as forcing the Administrator to execute actions without their knowledge or consent. For instance, the attacker can force the Administrator to add a new administrator controlled by the attacker, thereby giving the attacker full control over the application.

Attackers can steal sensitive information such as login credentials, session tokens, and personally identifiable information (PII).

The vulnerability can lead to defacement of the Application.

Mitigation:

Implement thorough input validation and sanitization mechanisms on all user inputs. This will help prevent malicious scripts from being stored and executed. sanitize {{ and }} to prevent data binding and interpolation of Vue.js. Sanitize malicious Javascript functions. Etc.

Steps to Reproduce:

Attacker Steps: 1. Provide an invalid username in Login. 2. Turn on intercept in Burp Suite. 3. In the intercepted request, add the following XSS payload as the value of loginname parameter (Copy from below file): payload.txt 4. Turn off the intercept.

Victim Steps: 5. Login as admin. 6. Go to System Logs, XSS payload will be executed and a popup will appear showing that the Application has been compromised.

Attacker Step: 7. Back at the Attacker's side, log in to the newly created attacker-controlled admin account having all the privileges. The credentials will be username: abcd & Password: abcd@@1234

Evidence:

image Figure 1: Code of Logging Invalid login attempts

image Figure 2: Code of saving Logs.

image Figure 3: Attacker injecting XSS payload.

image Figure 4: XSS payload Executed.

image Figure 5: XSS payload Reflection.

Video POC

https://github.com/froxlor/Froxlor/assets/59286712/7ba7d3e7-9ee9-4e64-988c-33fd4ebbca27

Database specific
{
    "nvd_published_at": "2024-05-14T15:38:26Z",
    "cwe_ids": [
        "CWE-79",
        "CWE-80"
    ],
    "severity": "CRITICAL",
    "github_reviewed": true,
    "github_reviewed_at": "2024-05-10T15:29:59Z"
}
References

Affected packages

Packagist / froxlor/froxlor

Package

Name
froxlor/froxlor
Purl
pkg:composer/froxlor/froxlor

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.1.9

Affected versions

0.*

0.10.0-rc1
0.10.0-rc2
0.10.0
0.10.1
0.10.2
0.10.3
0.10.4
0.10.5
0.10.6
0.10.7
0.10.8
0.10.9
0.10.10
0.10.11
0.10.12
0.10.13
0.10.14
0.10.15
0.10.16
0.10.17
0.10.18
0.10.19
0.10.20
0.10.21
0.10.22
0.10.23
0.10.23.1
0.10.24
0.10.25
0.10.26
0.10.27
0.10.28
0.10.29
0.10.29.1
0.10.30
0.10.31
0.10.32
0.10.33
0.10.34
0.10.34.1
0.10.35
0.10.35.1
0.10.36
0.10.37
0.10.38
0.10.38.1
0.10.38.2
0.10.38.3

2.*

2.0.0
2.0.1
2.0.2
2.0.3
2.0.4
2.0.5
2.0.6
2.0.7
2.0.8
2.0.9
2.0.10
2.0.11
2.0.12
2.0.13
2.0.14
2.0.15
2.0.16
2.0.17
2.0.18
2.0.19
2.0.20
2.0.21
2.0.22
2.0.23
2.0.24
2.1.0-beta1
2.1.0-beta2
2.1.0-rc1
2.1.0-rc2
2.1.0-rc3
2.1.0
2.1.1
2.1.2
2.1.3
2.1.4
2.1.5
2.1.6
2.1.7
2.1.8