ghsa-q7g6-xfh2-vhpx
Vulnerability from github
Summary
The email
field in phpMyFAQ's user control panel page is vulnerable to stored XSS attacks due to the inadequacy of PHP's FILTER_VALIDATE_EMAIL
function, which only validates the email format, not its content. This vulnerability enables an attacker to execute arbitrary client-side JavaScript within the context of another user's phpMyFAQ session.
Details
Despite using PHP's FILTER_VALIDATE_EMAIL
function, the email field does not adequately validate the content of the email address. This means that malicious input, such as JavaScript code, can be accepted and stored in the database without being detected. When the stored data is retrieved and displayed on web pages, it is not properly sanitized to remove or neutralize any potentially harmful content, such as JavaScript code which leads to Stored XSS.
PoC
-
Login as any user, go to the user control panel, change email to any valid email and intercept the request.
-
Modify the request’s email parameter to the following payload:
"><svg/onload=confirm('XSS')>"@x.y
-
Send the request and see that the XSS is triggered in the user control panel page.
-
Also affects any user who browse to "../admin/?action=user&user_action=listallusers"
Impact
This allows an attacker to execute arbitrary client side JavaScript within the context of another user's phpMyFAQ session.
{ "affected": [ { "package": { "ecosystem": "Packagist", "name": "phpmyfaq/phpmyfaq" }, "ranges": [ { "events": [ { "introduced": "3.2.5" }, { "fixed": "3.2.6" } ], "type": "ECOSYSTEM" } ], "versions": [ "3.2.5" ] } ], "aliases": [ "CVE-2024-27300" ], "database_specific": { "cwe_ids": [ "CWE-79" ], "github_reviewed": true, "github_reviewed_at": "2024-03-25T19:46:28Z", "nvd_published_at": "2024-03-25T19:15:57Z", "severity": "MODERATE" }, "details": "### Summary\nThe `email` field in phpMyFAQ\u0027s user control panel page is vulnerable to stored XSS attacks due to the inadequacy of PHP\u0027s `FILTER_VALIDATE_EMAIL` function, which only validates the email format, not its content. This vulnerability enables an attacker to execute arbitrary client-side JavaScript within the context of another user\u0027s phpMyFAQ session.\n\n### Details\nDespite using PHP\u0027s `FILTER_VALIDATE_EMAIL` function, the email field does not adequately validate the content of the email address. This means that malicious input, such as JavaScript code, can be accepted and stored in the database without being detected. When the stored data is retrieved and displayed on web pages, it is not properly sanitized to remove or neutralize any potentially harmful content, such as JavaScript code which leads to Stored XSS.\n\n### PoC\n1. Login as any user, go to the user control panel, change email to any valid email and intercept the request.\n\n2. Modify the request\u2019s email parameter to the following payload: `\"\u003e\u003csvg/onload=confirm(\u0027XSS\u0027)\u003e\"@x.y`\n\n\n\n3. Send the request and see that the XSS is triggered in the user control panel page.\n\n\n\n4. Also affects any user who browse to \"../admin/?action=user\u0026user_action=listallusers\"\n\n\n\n### Impact\nThis allows an attacker to execute arbitrary client side JavaScript within the context of another user\u0027s phpMyFAQ session.\n", "id": "GHSA-q7g6-xfh2-vhpx", "modified": "2024-03-25T22:28:21Z", "published": "2024-03-25T19:46:28Z", "references": [ { "type": "WEB", "url": "https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-q7g6-xfh2-vhpx" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-27300" }, { "type": "WEB", "url": "https://github.com/thorsten/phpMyFAQ/commit/09336b0ff0e0a04aa0c97c5975651af4769d2459" }, { "type": "WEB", "url": "https://github.com/thorsten/phpMyFAQ/commit/de90315c9bd4ead5fe6ba5586f6b016843aa8209" }, { "type": "PACKAGE", "url": "https://github.com/thorsten/phpMyFAQ" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L", "type": "CVSS_V3" } ], "summary": "phpMyFAQ stored Cross-site Scripting at user email" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.