CVE-2024-34070: Froxlor/froxlor Cross-Site Scripting Vulnerability

CRITICAL
Advisory Identifier: GHSA-x525-54hf-xr53
CVSS 9.6
CWE-80 CWE-79
Published
Advisory Summary

CVE-2024-34070 is a CRITICAL (CVSS 9.6) cross-site scripting vulnerability (CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)) affecting Froxlor/froxlor libraries in the Packagist ecosystem. The issue involves blind xss leading to froxlor application compromise. Remediation is available by upgrading affected packages to version 2.1.9.

CVE-2024-34070 at a Glance

CVE Identifier CVE-2024-34070
GHSA Identifier GHSA-x525-54hf-xr53
Severity CRITICAL
CVSS v3.1 Base Score 9.6
CWE Classification CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
Affected Product Froxlor/froxlor
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-34070

To remediate this vulnerability, upgrade all affected Froxlor/froxlor dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

froxlor/froxlor fixed: 2.1.9
Upgrade froxlor/froxlor to 2.1.9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for froxlor/froxlor

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-34070, inspect your project dependencies for Froxlor/froxlor:

inspect dependencies for froxlor/froxlor

Analyze the terminal output to locate any version of Froxlor/froxlor in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.9), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. In Froxlor/froxlor, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/froxlor/Froxlor/files/15142616/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](https://github.com/froxlor/Froxlor/files/15142616/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](https://github.com/froxlor/Froxlor/assets/59286712/31cf0cb8-b0e4-46d0-a6b8-a0e22fda64b8) _Figure 1: Code of Logging Invalid login attempts_ ![image](https://github.com/froxlor/Froxlor/assets/59286712/6acef52a-d5ba-477d-b502-a7fe27fd5085) _Figure 2: Code of saving Logs._ ![image](https://github.com/froxlor/Froxlor/assets/59286712/2adf8ae5-66be-4e22-938b-c9e5dcb764c0) _Figure 3: Attacker injecting XSS payload._ ![image](https://github.com/froxlor/Froxlor/assets/59286712/d3ccf6f9-2a23-40a4-97fc-e9585553ac52) _Figure 4: XSS payload Executed._ ![image](https://github.com/froxlor/Froxlor/assets/59286712/3c7f24f6-4049-49d3-978b-d83800fe8a80) _Figure 5: XSS payload Reflection._ ### Video POC https://github.com/froxlor/Froxlor/assets/59286712/7ba7d3e7-9ee9-4e64-988c-33fd4ebbca27

CVE-2024-34070 Affected Froxlor/froxlor Versions

1 component(s)
Fixed Versions:
2.1.9
Product / Package Ecosystem Affected Versions Fixed Version
froxlor/froxlor
Packagist
< 2.1.9
2.1.9

References

Frequently Asked Questions

What is CVE-2024-34070?
CVE-2024-34070 is a security vulnerability in Froxlor/froxlor involving Blind XSS Leading to Froxlor Application Compromise under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS).
Which Froxlor/froxlor versions are affected?
Affected versions include releases prior to 2.1.9 across affected packages: froxlor/froxlor.
What version fixes CVE-2024-34070?
Upgrading to 2.1.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is froxlor/froxlor affected?
Yes, froxlor/froxlor is affected in releases prior to 2.1.9. Upgrade your dependency to 2.1.9 or later.
What is the CVSS score of CVE-2024-34070?
CVE-2024-34070 has a CVSS v3.1 base score of 9.6 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2024-34070?
CVE-2024-34070 is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) (The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages.).
How can I check Packagist dependencies for CVE-2024-34070?
Run the dependency tree command: 'inspect dependencies for froxlor/froxlor'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x525-54hf-xr53",
  "modified" : "2024-05-14T20:00:57Z",
  "published" : "2024-05-10T15:29:59Z",
  "aliases" : [ "CVE-2024-34070" ],
  "summary" : "Blind XSS Leading to Froxlor Application Compromise",
  "details" : "### Description:\n\nA 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.\n\nThe 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\n\nA working XSS payload was crafted which forces an administrator to add a new malicious attacker-controlled Administrator User. The Payload is:\n[payload.txt](https://github.com/froxlor/Froxlor/files/15142616/payload.txt)\n\n\nBy 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.\n\n### Impact:\nThe 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.\n\nAttackers can steal sensitive information such as login credentials, session tokens, and personally identifiable information (PII).\n\nThe vulnerability can lead to defacement of the Application.\n\n\n### Mitigation:\nImplement 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.\nSanitize malicious Javascript functions. Etc.\n\n### Steps to Reproduce:\n\n**Attacker Steps:**\n1. Provide an invalid username in Login.\n2. Turn on intercept in Burp Suite.\n3. In the intercepted request, add the following XSS payload as the value of loginname parameter (Copy from below file):\n[payload.txt](https://github.com/froxlor/Froxlor/files/15142616/payload.txt)\n4. Turn off the intercept.\n\n**Victim Steps:**\n5. Login as admin.\n6. Go to System Logs, XSS payload will be executed and a popup will appear showing that the Application has been compromised.\n\n**Attacker Step:**\n7. 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`\n\n### Evidence:\n\n![image](https://github.com/froxlor/Froxlor/assets/59286712/31cf0cb8-b0e4-46d0-a6b8-a0e22fda64b8)\n_Figure 1: Code of Logging Invalid login attempts_\n\n![image](https://github.com/froxlor/Froxlor/assets/59286712/6acef52a-d5ba-477d-b502-a7fe27fd5085)\n_Figure 2: Code of saving Logs._\n\n![image](https://github.com/froxlor/Froxlor/assets/59286712/2adf8ae5-66be-4e22-938b-c9e5dcb764c0)\n_Figure 3: Attacker injecting XSS payload._\n\n![image](https://github.com/froxlor/Froxlor/assets/59286712/d3ccf6f9-2a23-40a4-97fc-e9585553ac52)\n_Figure 4: XSS payload Executed._\n\n![image](https://github.com/froxlor/Froxlor/assets/59286712/3c7f24f6-4049-49d3-978b-d83800fe8a80)\n_Figure 5: XSS payload Reflection._\n\n### Video POC\n\nhttps://github.com/froxlor/Froxlor/assets/59286712/7ba7d3e7-9ee9-4e64-988c-33fd4ebbca27\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "froxlor/froxlor"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/froxlor/Froxlor/security/advisories/GHSA-x525-54hf-xr53"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34070"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/froxlor/Froxlor/commit/a862307bce5cdfb1c208b835f3e8faddd23046e6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/froxlor/Froxlor"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79", "CWE-80" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-10T15:29:59Z",
    "nvd_published_at" : "2024-05-14T15:38:26Z"
  }
}