CVE-2024-29179: phpMyFAQ Stored Cross-site Scripting at File Attachments

Published Mar 25, 2024
·
Updated

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 1. Admin users can upload attachments containing XSS payloads in files without extensions to bypass the .html extension check. !image

2. 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.

Other sources

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.

NVD

Affected Software

2 affected componentsFixes available
composer/phpmyfaq/phpmyfaq=3.2.5
3.2.6
PhpMyFaq phpmyfaq=3.2.5

Event History

Mar 25, 2024
Advisory Published
via GitHub·07:45 PM
CVE Published
via MITRE·08:27 PM
Data Sourced
via MITRE·08:27 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is the severity of CVE-2024-29179?

CVE-2024-29179 is a serious vulnerability due to its potential for facilitating XSS attacks with admin-level privileges.

2

How do I fix CVE-2024-29179?

To fix CVE-2024-29179, upgrade to phpMyFAQ version 3.2.6 or newer.

3

Who is affected by CVE-2024-29179?

CVE-2024-29179 affects users of phpMyFAQ version 3.2.5 and earlier.

4

What type of attack can be executed through CVE-2024-29179?

CVE-2024-29179 allows an attacker to execute Cross-Site Scripting (XSS) attacks by uploading malicious attachments.

5

Is CVE-2024-29179 a code execution vulnerability?

No, CVE-2024-29179 is specifically a Cross-Site Scripting (XSS) vulnerability and does not allow for arbitrary code execution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203