4.3medium
phpMyFAQ Stored Cross-site Scripting at File Attachments
- Severity
- 4.3medium CVSS:3.0 by GitHub_M
- Exploit likelihood
- 0.51% (higher than 44% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-hm8r-95g3-5hj9
Description
phpMyFAQ is an open source FAQ web application for PHP 8.1+ and MySQL, PostgreSQL and other databases. An attacker with admin privileges can upload an attachment containing JS code without extension and the application will render it as HTML which allows for XSS attacks.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| thorsten phpMyFAQ | 3.2.5 | CVE List |
| phpmyfaq/phpmyfaq (Packagist) | from 3.2.5 before 3.2.6 | GitHub Advisory Database |
| phpmyfaq phpmyfaq | 3.2.5 | NVD |
All scores
| GitHub_M | 4.3medium CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L |
| GitHub | 4.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L |
| NVD | 4.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
phpMyFAQ is an open source FAQ web application for PHP 8.1+ and MySQL, PostgreSQL and other databases. An attacker with admin privileges can upload an attachment containing JS code without extension and the application will render it as HTML which allows for XSS attacks.
GitHub Advisory Database
Summary
An attacker with admin privileges can upload an attachment containing JS code without extension and the application will render it as HTML which allows for XSS attacks.
Details
When attachments are uploaded without an extension, the application renders it as HTML by default. Therefore allowing attackers to upload .html files containing javascript code to perform XSS attacks. The direct file path to the uploaded attachment is also easily obtainable as it is made up of substrings of the file's MD5 hashes.
PoC
-
Admin users can upload attachments containing XSS payloads in files without extensions to bypass the .html extension check. image
-
Since the path of the uploaded file is built entirely on the file’s MD5 hash and the attachment directory, it is possible for an attacker to know the direct path of the uploaded file.
E.g file MD5 hash: 38fff51cb7248a06d6142c6bdf846831
URL will be: http://127.0.0.1/phpmyfaq/attachments/38fff/51cb7/248a0/6d6142c6bdf846831
- /attachments
- /38fff (first 5 chars of MD5 hash)
- /51cb7 (next 5 chars of MD5 hash)
- /248a0 (next 5 chars of MD5 hash)
- /6d6142c6bdf846831 (remaining chars of MD5 hash)
3. Even though the attachment was uploaded without a file extension, it is still rendered as .html, hence triggering the XSS payload. image
Impact
This allows an attacker to execute arbitrary client side JavaScript within the context of another user's phpMyFAQ session.
NVD (es)
phpMyFAQ es una aplicación web de preguntas frecuentes de código abierto para PHP 8.1+ y MySQL, PostgreSQL y otras bases de datos. Un atacante con privilegios de administrador puede cargar un archivo adjunto que contenga código JS sin extensión y la aplicación lo representará como HTML, lo que permite ataques XSS.
References
| https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-hm8r-95g3-5hj9 | exploit, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2024-29179 | advisory | |
| https://github.com/thorsten/phpMyFAQ | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-29179 changed 2025-04-10 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hm8r-95g3-5hj9 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-29179 changed 2026-06-17 | Public domain |